提交 5dc9a02b 编写于 作者: B baiy 提交者: ninecents

定制主题 细节调整

上级 0858267e
此差异已折叠。
{
"name": "c-tool",
"version": "1.4.5",
"version": "1.5.5",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --port 8081",
......@@ -50,6 +50,8 @@
"babel-eslint": "^10.1.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.2.3",
"less": "^2.7.3",
"less-loader": "^5.0.0",
"vue-cli-plugin-iview": "^1.0.6",
"vue-template-compiler": "^2.6.12"
},
......
@import '~view-design/src/styles/index.less';
@primary-color: #1abc9c;
@link-color: #1abc9c;
\ No newline at end of file
import Vue from 'vue'
import ViewUI from 'view-design'
import 'view-design/dist/styles/iview.css'
import './statics/theme.less'
import router from './tool.router'
import optionBlock from './components/optionBlock'
import {plugin as modelPlugin} from './tool/model'
......@@ -13,6 +13,7 @@ import {isUtools} from './helper'
const page = document.getElementById('page')
page.style.width = 'auto'
page.style.height = 'auto'
page.style.minHeight = '500px'
}
})()
......
......@@ -4,56 +4,64 @@
<option-block>
<FormItem>
<ButtonGroup>
<Button type="primary" @click="handle(v)" v-for="v in type" :key="v">{{v}}</Button>
<Button type="primary" @click="handle(v)" v-for="v in type" :key="v">{{ v }}</Button>
</ButtonGroup>
</FormItem>
<FormItem>
<Checkbox v-model="current.isUppercase">大写字母</Checkbox>
</FormItem>
</option-block>
<Input v-model="current.output" :rows="7" type="textarea" placeholder="结果"></Input>
</div>
</template>
<script>
import crypto from "crypto-js"
export default {
created() {
this.current = Object.assign(this.current,this.$getToolData("input"))
},
methods: {
handle(v) {
if (this.current.input) {
switch (v) {
case "md5":
this.current.output = crypto.MD5(this.current.input).toString();
break;
case "sha1":
this.current.output = crypto.SHA1(this.current.input).toString();
break;
case "sha256":
this.current.output = crypto.SHA256(this.current.input).toString();
break;
case "sha512":
this.current.output = crypto.SHA512(this.current.input).toString();
break;
case "sm3":
this.current.output = require('sm-crypto').sm3(this.current.input);
break;
default:
return;
}
this.current.operation = v;
this.$clipboardCopy(this.current.output);
this.$saveToolData(this.current);
import crypto from "crypto-js"
export default {
created() {
this.current = Object.assign(this.current, this.$getToolData("input"))
},
methods: {
handle(v) {
if (this.current.input) {
switch (v) {
case "md5":
this.current.output = crypto.MD5(this.current.input).toString();
break;
case "sha1":
this.current.output = crypto.SHA1(this.current.input).toString();
break;
case "sha256":
this.current.output = crypto.SHA256(this.current.input).toString();
break;
case "sha512":
this.current.output = crypto.SHA512(this.current.input).toString();
break;
case "sm3":
this.current.output = require('sm-crypto').sm3(this.current.input);
break;
default:
return;
}
if (this.current.isUppercase) {
this.current.output = this.current.output.toUpperCase()
}
this.current.operation = v;
this.$clipboardCopy(this.current.output);
this.$saveToolData(this.current);
}
},
data() {
return {
current:{
input: "",
output: "",
operation:""
},
type: ['md5', 'sha1', 'sha256', 'sha512',"sm3"]
}
},
}
}
},
data() {
return {
current: {
input: "",
isUppercase: false,
output: "",
operation: ""
},
type: ['md5', 'sha1', 'sha256', 'sha512', "sm3"]
}
},
}
</script>
\ No newline at end of file
......@@ -11,7 +11,7 @@
</ButtonGroup>
</FormItem>
<FormItem>
<Alert>ip信息来源 <a href="http://ip.taobao.com/" target="_blank">http://ip.taobao.com/</a></Alert>
<Alert>ip信息来源 <a href="https://ip.taobao.com/" target="_blank">https://ip.taobao.com/</a></Alert>
</FormItem>
</option-block>
<div style="border: 1px solid #dcdee2;border-radius: 4px;">
......@@ -49,7 +49,7 @@
handle() {
if (this.current.input) {
request({
url:"http://ip.taobao.com/outGetIpInfo",
url:"https://ip.taobao.com/outGetIpInfo",
data:{
"ip":this.current.input === "localhost" ? 'myip' : this.current.input,
"accessKey": "alibaba-inc"
......
<template>
<div>11</div>
</template>
<script>
export default {
name: "smCrypto",
created () {
const sm2 = require('sm-crypto').sm2
console.log(sm2.generateKeyPairHex())
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -36,7 +36,7 @@
format="yyyy-MM-dd HH:mm:ss"></DatePicker>
</FormItem>
<FormItem>
<Select transfer v-model="current.duration.type" style="width: 60px">
<Select transfer v-model="current.duration.type" style="width: 100px">
<Option value="+">添加</Option>
<Option value="-">减少</Option>
</Select>
......
......@@ -3,7 +3,7 @@
<option-block style="text-align: center">
<FormItem>
<ButtonGroup>
<Button :type="current.type === v.key ? 'success' : 'primary'"
<Button :type="current.type === v.key ? 'info' : 'primary'"
@click="handle(v.key)"
v-for="v in unitLists"
style="padding: 5px 10px 6px;"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册