提交 3b134a4c 编写于 作者: B baiy 提交者: ninecents

历史记录功能升级 #31

json输入框高度动态设置 #30
上级 80e855dd
{ {
"name": "c-tool", "name": "c-tool",
"version": "1.1.0", "version": "1.2.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
...@@ -2954,7 +2954,7 @@ ...@@ -2954,7 +2954,7 @@
}, },
"JSV": { "JSV": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz", "resolved": "https://registry.npm.taobao.org/JSV/download/JSV-4.0.2.tgz",
"integrity": "sha1-0Hf2glVx+CEy+d/67Vh7QCn+/1c=" "integrity": "sha1-0Hf2glVx+CEy+d/67Vh7QCn+/1c="
}, },
"accepts": { "accepts": {
...@@ -3006,7 +3006,7 @@ ...@@ -3006,7 +3006,7 @@
}, },
"ajax-request": { "ajax-request": {
"version": "1.2.3", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/ajax-request/-/ajax-request-1.2.3.tgz", "resolved": "https://registry.npm.taobao.org/ajax-request/download/ajax-request-1.2.3.tgz",
"integrity": "sha1-mfy+wdbSeS+F+pSVNTMr0U9fN5A=", "integrity": "sha1-mfy+wdbSeS+F+pSVNTMr0U9fN5A=",
"requires": { "requires": {
"file-system": "^2.1.1", "file-system": "^2.1.1",
...@@ -3254,9 +3254,9 @@ ...@@ -3254,9 +3254,9 @@
"dev": true "dev": true
}, },
"async-validator": { "async-validator": {
"version": "3.4.0", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-3.4.0.tgz", "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-3.5.1.tgz",
"integrity": "sha512-VrFk4eYiJAWKskEz115iiuCf9O0ftnMMPXrOFMqyzGH2KxO7YwncKyn/FgOOP+0MDHMfXL7gLExagCutaZGigA==" "integrity": "sha512-DDmKA7sdSAJtTVeNZHrnr2yojfFaoeW8MfQN8CeuXg8DDQHTqKk9Fdv38dSvnesHoO8MUwMI2HphOeSyIF+wmQ=="
}, },
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
...@@ -3414,7 +3414,7 @@ ...@@ -3414,7 +3414,7 @@
}, },
"babel-runtime": { "babel-runtime": {
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "resolved": "http://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": { "requires": {
"core-js": "^2.4.0", "core-js": "^2.4.0",
...@@ -3502,7 +3502,7 @@ ...@@ -3502,7 +3502,7 @@
}, },
"batch-processor": { "batch-processor": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/batch-processor/-/batch-processor-1.0.0.tgz", "resolved": "http://registry.npm.taobao.org/batch-processor/download/batch-processor-1.0.0.tgz",
"integrity": "sha1-dclcMrdI4IUNEMKxaPa9vpiRrOg=" "integrity": "sha1-dclcMrdI4IUNEMKxaPa9vpiRrOg="
}, },
"bcrypt-pbkdf": { "bcrypt-pbkdf": {
...@@ -3783,7 +3783,7 @@ ...@@ -3783,7 +3783,7 @@
}, },
"buffer-fill": { "buffer-fill": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", "resolved": "http://registry.npm.taobao.org/buffer-fill/download/buffer-fill-1.0.0.tgz",
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
}, },
"buffer-from": { "buffer-from": {
...@@ -4685,18 +4685,18 @@ ...@@ -4685,18 +4685,18 @@
} }
}, },
"cron-parser": { "cron-parser": {
"version": "2.16.3", "version": "2.18.0",
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-2.16.3.tgz", "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-2.18.0.tgz",
"integrity": "sha512-XNJBD1QLFeAMUkZtZQuncAAOgJFWNhBdIbwgD22hZxrcWOImBFMKgPC66GzaXpyoJs7UvYLLgPH/8BRk/7gbZg==", "integrity": "sha512-s4odpheTyydAbTBQepsqd2rNWGa2iV3cyo8g7zbI2QQYGLVsfbhmwukayS1XHppe02Oy1fg7mg6xoaraVJeEcg==",
"requires": { "requires": {
"is-nan": "^1.3.0", "is-nan": "^1.3.0",
"moment-timezone": "^0.5.31" "moment-timezone": "^0.5.31"
} }
}, },
"cronstrue": { "cronstrue": {
"version": "1.100.0", "version": "1.105.0",
"resolved": "https://registry.npmjs.org/cronstrue/-/cronstrue-1.100.0.tgz", "resolved": "https://registry.npmjs.org/cronstrue/-/cronstrue-1.105.0.tgz",
"integrity": "sha512-Hz+xjjmq2QgCQhnPxIVM02dwhOt5GwUywjKa17je9JWX4z2E0uecObXCFap8bmJE87JL9mToW/cGw5O06JgigQ==" "integrity": "sha512-Bv8GHi5uJvxtq/9T7lgBwum7UVKMfR+LSPHZXiezP0E5gnODPVRQBAkCwijCIaWEepqmRcxTAxrUFB0UQK2wdw=="
}, },
"cross-spawn": { "cross-spawn": {
"version": "6.0.5", "version": "6.0.5",
...@@ -5321,7 +5321,7 @@ ...@@ -5321,7 +5321,7 @@
}, },
"dijkstrajs": { "dijkstrajs": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.1.tgz", "resolved": "https://registry.npm.taobao.org/dijkstrajs/download/dijkstrajs-1.0.1.tgz",
"integrity": "sha1-082BIh4+pAdCz83lVtTpnpjdxxs=" "integrity": "sha1-082BIh4+pAdCz83lVtTpnpjdxxs="
}, },
"dir-glob": { "dir-glob": {
...@@ -6400,7 +6400,7 @@ ...@@ -6400,7 +6400,7 @@
}, },
"file-match": { "file-match": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/file-match/-/file-match-1.0.2.tgz", "resolved": "https://registry.npm.taobao.org/file-match/download/file-match-1.0.2.tgz",
"integrity": "sha1-ycrSZdLIrfOoFHWw30dYWQafrvc=", "integrity": "sha1-ycrSZdLIrfOoFHWw30dYWQafrvc=",
"requires": { "requires": {
"utils-extend": "^1.0.6" "utils-extend": "^1.0.6"
...@@ -6408,7 +6408,7 @@ ...@@ -6408,7 +6408,7 @@
}, },
"file-system": { "file-system": {
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/file-system/-/file-system-2.2.2.tgz", "resolved": "https://registry.npm.taobao.org/file-system/download/file-system-2.2.2.tgz",
"integrity": "sha1-fWWDPjojR9zZVqgTxncVPtPt2Yc=", "integrity": "sha1-fWWDPjojR9zZVqgTxncVPtPt2Yc=",
"requires": { "requires": {
"file-match": "^1.0.1", "file-match": "^1.0.1",
...@@ -7395,7 +7395,7 @@ ...@@ -7395,7 +7395,7 @@
}, },
"has-color": { "has-color": {
"version": "0.1.7", "version": "0.1.7",
"resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", "resolved": "https://registry.npm.taobao.org/has-color/download/has-color-0.1.7.tgz",
"integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=" "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8="
}, },
"has-flag": { "has-flag": {
...@@ -7990,7 +7990,7 @@ ...@@ -7990,7 +7990,7 @@
}, },
"ipinyinjs": { "ipinyinjs": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/ipinyinjs/-/ipinyinjs-1.0.0.tgz", "resolved": "https://registry.npm.taobao.org/ipinyinjs/download/ipinyinjs-1.0.0.tgz",
"integrity": "sha1-NlEy7jIB6ncjQigicCXTpDE6q34=" "integrity": "sha1-NlEy7jIB6ncjQigicCXTpDE6q34="
}, },
"is-absolute-url": { "is-absolute-url": {
...@@ -8621,32 +8621,32 @@ ...@@ -8621,32 +8621,32 @@
}, },
"lodash.isarray": { "lodash.isarray": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.3.tgz", "resolved": "https://registry.npm.taobao.org/lodash.isarray/download/lodash.isarray-3.0.3.tgz",
"integrity": "sha1-TboTmi2QfCT9CWhJzkLxnCVSNVM=" "integrity": "sha1-TboTmi2QfCT9CWhJzkLxnCVSNVM="
}, },
"lodash.isboolean": { "lodash.isboolean": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.1.tgz", "resolved": "https://registry.npm.taobao.org/lodash.isboolean/download/lodash.isboolean-3.0.1.tgz",
"integrity": "sha1-78xyujJHQ67YimGIta2qWNnDGaQ=" "integrity": "sha1-78xyujJHQ67YimGIta2qWNnDGaQ="
}, },
"lodash.isnull": { "lodash.isnull": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/lodash.isnull/-/lodash.isnull-3.0.0.tgz", "resolved": "https://registry.npm.taobao.org/lodash.isnull/download/lodash.isnull-3.0.0.tgz",
"integrity": "sha1-+vvlnqHcon7teGU0A53YTC4HxW4=" "integrity": "sha1-+vvlnqHcon7teGU0A53YTC4HxW4="
}, },
"lodash.isnumber": { "lodash.isnumber": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.1.tgz", "resolved": "https://registry.npm.taobao.org/lodash.isnumber/download/lodash.isnumber-3.0.1.tgz",
"integrity": "sha1-YoofPxmOLdzSt+uRY1QLZ3YlWYU=" "integrity": "sha1-YoofPxmOLdzSt+uRY1QLZ3YlWYU="
}, },
"lodash.isobject": { "lodash.isobject": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", "resolved": "https://registry.npm.taobao.org/lodash.isobject/download/lodash.isobject-3.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash.isobject%2Fdownload%2Flodash.isobject-3.0.2.tgz",
"integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=" "integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0="
}, },
"lodash.isstring": { "lodash.isstring": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-3.0.1.tgz", "resolved": "https://registry.npm.taobao.org/lodash.isstring/download/lodash.isstring-3.0.1.tgz",
"integrity": "sha1-QWOJROoELvZ61nwpOqVB0/PW5Tw=" "integrity": "sha1-QWOJROoELvZ61nwpOqVB0/PW5Tw="
}, },
"lodash.kebabcase": { "lodash.kebabcase": {
...@@ -8669,7 +8669,7 @@ ...@@ -8669,7 +8669,7 @@
}, },
"lodash.throttle": { "lodash.throttle": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", "resolved": "http://registry.npm.taobao.org/lodash.throttle/download/lodash.throttle-4.1.1.tgz",
"integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ="
}, },
"lodash.transform": { "lodash.transform": {
...@@ -9039,14 +9039,14 @@ ...@@ -9039,14 +9039,14 @@
} }
}, },
"moment": { "moment": {
"version": "2.27.0", "version": "2.29.1",
"resolved": "https://registry.npm.taobao.org/moment/download/moment-2.27.0.tgz?cache=0&sync_timestamp=1592516084857&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.27.0.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha1-i/9OPiaiNiIN/j423nVrbrqgEF0=" "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
}, },
"moment-timezone": { "moment-timezone": {
"version": "0.5.31", "version": "0.5.32",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz", "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.32.tgz",
"integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==", "integrity": "sha512-Z8QNyuQHQAmWucp8Knmgei8YNo28aLjJq6Ma+jy1ZSpSk5nyfRT8xgUbSQvD2+2UajISfenndwvFuH3NGS+nvA==",
"requires": { "requires": {
"moment": ">= 2.9.0" "moment": ">= 2.9.0"
} }
...@@ -9238,7 +9238,7 @@ ...@@ -9238,7 +9238,7 @@
}, },
"nomnom": { "nomnom": {
"version": "1.8.1", "version": "1.8.1",
"resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", "resolved": "https://registry.npm.taobao.org/nomnom/download/nomnom-1.8.1.tgz",
"integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=",
"requires": { "requires": {
"chalk": "~0.4.0", "chalk": "~0.4.0",
...@@ -9247,12 +9247,12 @@ ...@@ -9247,12 +9247,12 @@
"dependencies": { "dependencies": {
"ansi-styles": { "ansi-styles": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-1.0.0.tgz",
"integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=" "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg="
}, },
"chalk": { "chalk": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-0.4.0.tgz",
"integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=",
"requires": { "requires": {
"ansi-styles": "~1.0.0", "ansi-styles": "~1.0.0",
...@@ -9262,7 +9262,7 @@ ...@@ -9262,7 +9262,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-0.1.1.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-0.1.1.tgz",
"integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=" "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE="
} }
} }
...@@ -9816,7 +9816,7 @@ ...@@ -9816,7 +9816,7 @@
}, },
"phparr": { "phparr": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/phparr/-/phparr-0.2.0.tgz", "resolved": "https://registry.npm.taobao.org/phparr/download/phparr-0.2.0.tgz",
"integrity": "sha1-WeqkMXLYSM7x3QMJtHLDfOkRTWU=", "integrity": "sha1-WeqkMXLYSM7x3QMJtHLDfOkRTWU=",
"requires": { "requires": {
"lodash.isarray": "3.0.3", "lodash.isarray": "3.0.3",
...@@ -10731,9 +10731,9 @@ ...@@ -10731,9 +10731,9 @@
"dev": true "dev": true
}, },
"query-string": { "query-string": {
"version": "6.13.1", "version": "6.13.7",
"resolved": "https://registry.npm.taobao.org/query-string/download/query-string-6.13.1.tgz?cache=0&sync_timestamp=1591853346096&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquery-string%2Fdownload%2Fquery-string-6.13.1.tgz", "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.13.7.tgz",
"integrity": "sha1-2RPM/OO0s6cTmJ/m05Rm2S5xzK0=", "integrity": "sha512-CsGs8ZYb39zu0WLkeOhe0NMePqgYdAuCqxOYKDR5LVCytDZYMGx3Bb+xypvQvPHVPijRXB0HZNFllCzHRe4gEA==",
"requires": { "requires": {
"decode-uri-component": "^0.2.0", "decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0", "split-on-first": "^1.0.0",
...@@ -10767,7 +10767,7 @@ ...@@ -10767,7 +10767,7 @@
}, },
"radix.js": { "radix.js": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/radix.js/-/radix.js-0.0.1.tgz", "resolved": "https://registry.npm.taobao.org/radix.js/download/radix.js-0.0.1.tgz",
"integrity": "sha1-rvAZaRF+YgL4cZcJX95z+7MQ8C8=" "integrity": "sha1-rvAZaRF+YgL4cZcJX95z+7MQ8C8="
}, },
"randombytes": { "randombytes": {
...@@ -11365,7 +11365,7 @@ ...@@ -11365,7 +11365,7 @@
}, },
"serialize-php": { "serialize-php": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/serialize-php/-/serialize-php-1.1.2.tgz", "resolved": "https://registry.npm.taobao.org/serialize-php/download/serialize-php-1.1.2.tgz",
"integrity": "sha1-rtn4fFazb1hr466Pk2s1VlR/b8o=" "integrity": "sha1-rtn4fFazb1hr466Pk2s1VlR/b8o="
}, },
"serve-index": { "serve-index": {
...@@ -11853,8 +11853,8 @@ ...@@ -11853,8 +11853,8 @@
}, },
"split-on-first": { "split-on-first": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/split-on-first/download/split-on-first-1.1.0.tgz", "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
"integrity": "sha1-9hCv7uOxK84dDDBCXnY5i3gkml8=" "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="
}, },
"split-string": { "split-string": {
"version": "3.1.0", "version": "3.1.0",
...@@ -12334,9 +12334,9 @@ ...@@ -12334,9 +12334,9 @@
"dev": true "dev": true
}, },
"tinycolor2": { "tinycolor2": {
"version": "1.4.1", "version": "1.4.2",
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",
"integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA=="
}, },
"tmp": { "tmp": {
"version": "0.0.33", "version": "0.0.33",
...@@ -12513,7 +12513,7 @@ ...@@ -12513,7 +12513,7 @@
}, },
"underscore": { "underscore": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", "resolved": "https://registry.npm.taobao.org/underscore/download/underscore-1.6.0.tgz",
"integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag="
}, },
"unicode-canonical-property-names-ecmascript": { "unicode-canonical-property-names-ecmascript": {
...@@ -12759,7 +12759,7 @@ ...@@ -12759,7 +12759,7 @@
}, },
"utils-extend": { "utils-extend": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/utils-extend/-/utils-extend-1.0.8.tgz", "resolved": "https://registry.npm.taobao.org/utils-extend/download/utils-extend-1.0.8.tgz",
"integrity": "sha1-zP17ZFQPjpDuIe7Fd2nQZRyril8=" "integrity": "sha1-zP17ZFQPjpDuIe7Fd2nQZRyril8="
}, },
"utils-merge": { "utils-merge": {
...@@ -12813,9 +12813,9 @@ ...@@ -12813,9 +12813,9 @@
} }
}, },
"view-design": { "view-design": {
"version": "4.3.2", "version": "4.4.0",
"resolved": "https://registry.npmjs.org/view-design/-/view-design-4.3.2.tgz", "resolved": "https://registry.npmjs.org/view-design/-/view-design-4.4.0.tgz",
"integrity": "sha512-58GH2fu5TVtUeeXWWu0VQXqgV01fGKHXhViw4p80OM/+SzhCJS2qzZYYpVyXaGKQM1OfeJHZrVFA/xLfpXK+0w==", "integrity": "sha512-2+xbda6/USUm9Pn+D25NPsIBg7XVhkFC90Ycs0GcFQ4AHZ1QRwDGOj0PGA3eeL4yuVpigdDfmwmNJAoczYXlPA==",
"requires": { "requires": {
"async-validator": "^3.3.0", "async-validator": "^3.3.0",
"deepmerge": "^2.2.1", "deepmerge": "^2.2.1",
...@@ -12918,9 +12918,9 @@ ...@@ -12918,9 +12918,9 @@
} }
}, },
"vue-router": { "vue-router": {
"version": "3.4.3", "version": "3.4.9",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.3.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.9.tgz",
"integrity": "sha512-BADg1mjGWX18Dpmy6bOGzGNnk7B/ZA0RxuA6qedY/YJwirMfKXIDzcccmHbQI0A6k5PzMdMloc0ElHfyOoX35A==" "integrity": "sha512-CGAKWN44RqXW06oC+u4mPgHLQQi2t6vLD/JbGRDAXm0YpMv0bgpKuU5bBd7AvMgfTz9kXVRIWKHqRwGEb8xFkA=="
}, },
"vue-style-loader": { "vue-style-loader": {
"version": "4.1.2", "version": "4.1.2",
......
{ {
"name": "c-tool", "name": "c-tool",
"version": "1.2.0", "version": "1.3.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve --port 8081", "serve": "vue-cli-service serve --port 8081",
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
"js-base64": "^2.6.4", "js-base64": "^2.6.4",
"jsonlint": "^1.6.3", "jsonlint": "^1.6.3",
"lscache": "^1.3.0", "lscache": "^1.3.0",
"moment": "^2.27.0", "moment": "^2.29.1",
"php-array-reader": "^1.2.0", "php-array-reader": "^1.2.0",
"phparr": "^0.2.0", "phparr": "^0.2.0",
"qrcode": "^1.4.4", "qrcode": "^1.4.4",
"qrcode-parser": "^1.2.0", "qrcode-parser": "^1.2.0",
"query-string": "^6.13.1", "query-string": "^6.13.7",
"radix.js": "0.0.1", "radix.js": "0.0.1",
"serialize-php": "^1.1.2", "serialize-php": "^1.1.2",
"sm-crypto": "^0.1.4", "sm-crypto": "^0.1.4",
......
<template> <template>
<div> <div>
<Menu mode="horizontal" theme="light" :active-name="currentCategory" @on-select="categorySelect" style="height: 45px;line-height: 45px;"> <Menu mode="horizontal" theme="light" :active-name="currentCategory" @on-select="categorySelect"
style="height: 45px;line-height: 45px;">
<MenuItem :name="cat.name" v-for="(cat) in category" :key="cat.name"> <MenuItem :name="cat.name" v-for="(cat) in category" :key="cat.name">
<Badge v-if="badgeCategoryIsShow(cat.name)" dot :offset="[15,-10]"> <Badge v-if="badgeCategoryIsShow(cat.name)" dot :offset="[15,-10]">
{{cat.title}} {{ cat.title }}
</Badge> </Badge>
<template v-else> <template v-else>
{{cat.title}} {{ cat.title }}
</template>
</MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_new">
<Icon type="md-expand" :size="24"/>
</MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_feedback">
<Icon type="md-help-circle" :size="24"/>
</MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_setting">
<Icon type="md-settings" :size="24"/>
</MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_about">
<Icon type="logo-github" :size="24"/>
</MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_history">
<Badge v-if="historyLength>0" dot :offset="[10,-3]">
<Icon type="md-time" :size="24"/>
</Badge>
<template v-else>
<Icon type="md-time" :size="24"/>
</template> </template>
</MenuItem> </MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_new"><Icon type="md-expand" :size="24" /></MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_feedback"><Icon type="md-help-circle" :size="24" /></MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_setting"><Icon type="md-settings" :size="24" /></MenuItem>
<MenuItem style="padding: 0 5px;float: right" name="_about"><Icon type="logo-github" :size="24" /></MenuItem>
</Menu> </Menu>
<RadioGroup :value="currentTool" @on-change="toolSelect" style="margin: 10px 0 10px 20px;line-height: 30px;"> <RadioGroup :value="currentTool" @on-change="toolSelect" style="margin: 10px 0 10px 20px;line-height: 30px;">
<Radio :label="tool.name" v-for="(tool) in tools" :key="tool.name"> <Radio :label="tool.name" v-for="(tool) in tools" :key="tool.name">
<Badge v-if="badgeToolIsShow(tool.name)" dot :offset="[5,-5]"> <Badge v-if="badgeToolIsShow(tool.name)" dot :offset="[5,-5]">
{{tool.title}} {{ tool.title }}
</Badge> </Badge>
<template v-else> <template v-else>
{{tool.title}} {{ tool.title }}
</template> </template>
</Radio> </Radio>
</RadioGroup> </RadioGroup>
<div> <div>
<router-view/> <router-view :key="$route.path + $route.query.t"/>
</div> </div>
<Drawer :title="currentToolTitle+' - 历史记录'" v-model="historyShow" :width="100">
<Table ref="historyTable" border :columns="historyColumns" :data="historyData" :height="historyTableHeight">
<template slot-scope="{ row }" slot="_value">
<div>{{ historyValue(row.value) }}}</div>
</template>
<template slot-scope="{ index,row }" slot="_op">
<Button type="primary" size="small" @click="historyView(index)">查看</Button>
<Button type="primary" style="margin-left: 5px" @click="historyLoad(index)" size="small">加载</Button>
</template>
</Table>
<div class="drawer-footer">
<Button type="primary" @click="historyClear">清空历史记录</Button>
</div>
</Drawer>
</div> </div>
</template> </template>
<script> <script>
import config from "./tool/config" import config from './tool/config'
import model from "./tool/model" import model from './tool/model'
import {openTab} from "./helper"; import historyFactory from './tool/history'
import {setLoadHistoryIndex} from './tool/history'
import { openTab } from './helper'
export default { export default {
data() { data () {
return { return {
category: config.category, category: config.category,
currentCategory: "", currentCategory: '',
currentTool: "", currentTool: '',
} historyData: [],
historyShow: false,
historyColumns: [
{
title: '操作时间',
key: 'time',
width:180
},
{
title: '数据',
slot: '_value',
ellipsis:true
},
{
title: '操作',
slot: '_op',
width:150
}
],
}
},
computed: {
tools () {
return config.getToolByCategory(this.currentCategory)
},
historyLength(){
return historyFactory(this.currentTool).length()
},
historyTableHeight() {
// 设置表格高度
return window.innerHeight - 140
}, },
computed: { currentToolTitle(){
tools() { return config.getToolTitle(this.currentTool)
return config.getToolByCategory(this.currentCategory) }
},
watch: {
currentTool (name) {
model.setCurrentTool(name)
this.$router.push('/tool/' + name)
},
},
created () {
this.currentCategory = model.getCategoryHistory()
this.currentTool = model.getToolHistory(this.currentCategory)
this.$Message.config({
top: 150,
})
},
mounted () {},
methods: {
categorySelect (name) {
switch (name) {
case '_feedback':
openTab('https://github.com/baiy/Ctool/issues')
break
case '_about':
openTab('https://github.com/baiy/Ctool')
break
case '_setting':
openTab('/setting.html')
break
case '_new':
openTab(window.location.href)
break
case '_history':
this.history()
break
default:
this.currentCategory = name
model.setCategoryHistory(name)
this.currentTool = model.getToolHistory(this.currentCategory)
break
} }
}, },
watch: { history () {
currentTool(name) { let history = historyFactory(this.currentTool)
model.setCurrentTool(name); if (history.length() < 1) {
this.$router.push("/tool/" + name); return this.$Message.error('暂无历史记录')
} }
this.historyData = history.all()
this.historyShow = true
}, },
created() { historyValue (value) {
this.currentCategory = model.getCategoryHistory(); return JSON.stringify(value)
this.currentTool = model.getToolHistory(this.currentCategory)
this.$Message.config({
top:150
})
}, },
mounted() {}, historyView(index){
methods: { console.log(historyFactory(this.currentTool).get(index))
categorySelect(name) { },
switch (name) { historyClear(){
case "_feedback": historyFactory(this.currentTool).clear()
openTab("https://github.com/baiy/Ctool/issues"); this.historyShow = false;
break; },
case "_about": historyLoad(index){
openTab("https://github.com/baiy/Ctool"); setLoadHistoryIndex(index)
break; this.historyShow = false;
case "_setting": this.$router.push({
openTab("/setting.html"); path:this.$router.currentRoute.fullPath,
break; query:{
case "_new": t:Date.now(),
openTab(window.location.href); },
break; });
default: },
this.currentCategory = name; toolSelect (name) {
model.setCategoryHistory(name); model.setToolHistory(this.currentCategory, name)
this.currentTool = model.getToolHistory(this.currentCategory) this.currentTool = name
break; },
} badgeToolIsShow (tool) {
}, return config.badgeToolIsShow(tool)
toolSelect(name) { },
model.setToolHistory(this.currentCategory, name) badgeCategoryIsShow (cat) {
this.currentTool = name return config.badgeCategoryIsShow(cat)
},
badgeToolIsShow(tool) {
return config.badgeToolIsShow(tool);
},
badgeCategoryIsShow(cat) {
return config.badgeCategoryIsShow(cat);
}
}, },
} },
</script> }
\ No newline at end of file </script>
<style scoped>
.drawer-footer{
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
</style>
\ No newline at end of file
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
remove (name) { remove (name) {
lsCache.remove(cacheNameConvert(name)) lsCache.remove(cacheNameConvert(name))
}, },
setnNoVersion (name, value, expiry = 0) { setNoVersion (name, value, expiry = 0) {
return lsCache.set('nv_' + name, value, expiry / 60) return lsCache.set('nv_' + name, value, expiry / 60)
}, },
getNoVersion (name, defaultValue = null) { getNoVersion (name, defaultValue = null) {
......
...@@ -2,18 +2,18 @@ import { env, inArray } from '../helper' ...@@ -2,18 +2,18 @@ import { env, inArray } from '../helper'
import cache from './cache' import cache from './cache'
// 工具缓存数据过期时间(秒) // 工具缓存数据过期时间(秒)
export const TOOL_DATA_EXPIRY = 1800 export const TOOL_DATA_EXPIRY = 3600 * 24
// 徽章过期时间(天) // 徽章过期时间(天)
export const BADGE_EXPIRY = 10 export const BADGE_EXPIRY = 10
// 分类徽章 // 分类徽章
export const BADGE_CATEGORY = ['json'] export const BADGE_CATEGORY = []
// 工具徽章 // 工具徽章
export const BADGE_TOOL = ['json'] export const BADGE_TOOL = []
// 默认常用工具 // 默认常用工具
export const DEFAULT_COMMON_TOOL = [ export const DEFAULT_COMMON_TOOL = [
'hash', 'encrypt', 'json' ,'base64', 'url', 'timestamp', 'hash', 'encrypt', 'json', 'base64', 'url', 'timestamp',
'qrCode', 'pinyin', 'ip', 'code', 'unicode', 'qrCode', 'pinyin', 'ip', 'code', 'unicode',
'decimalConvert', 'randomString','diffs' 'decimalConvert', 'randomString', 'diffs',
] ]
const category = [ const category = [
...@@ -28,7 +28,7 @@ const tool = [ ...@@ -28,7 +28,7 @@ const tool = [
{ 'name': 'hash', 'title': '哈希(hash)', cat: ['encryption'] }, { 'name': 'hash', 'title': '哈希(hash)', cat: ['encryption'] },
{ 'name': 'encrypt', 'title': '加密/解密', cat: ['encryption'] }, { 'name': 'encrypt', 'title': '加密/解密', cat: ['encryption'] },
{ 'name': 'base64', 'title': 'BASE64编码', cat: ['encryption'] }, { 'name': 'base64', 'title': 'BASE64编码', cat: ['encryption'] },
{ 'name': 'json', 'title': 'JSON工具', cat: ['conversion','json'] }, { 'name': 'json', 'title': 'JSON工具', cat: ['conversion', 'json'] },
{ 'name': 'url', 'title': 'URL编码', cat: ['conversion'] }, { 'name': 'url', 'title': 'URL编码', cat: ['conversion'] },
{ 'name': 'timestamp', 'title': '时间戳', cat: ['conversion'] }, { 'name': 'timestamp', 'title': '时间戳', cat: ['conversion'] },
{ 'name': 'qrCode', 'title': '二维码', cat: ['other'] }, { 'name': 'qrCode', 'title': '二维码', cat: ['other'] },
...@@ -39,7 +39,11 @@ const tool = [ ...@@ -39,7 +39,11 @@ const tool = [
{ 'name': 'decimalConvert', 'title': '进制转换', cat: ['conversion'] }, { 'name': 'decimalConvert', 'title': '进制转换', cat: ['conversion'] },
{ 'name': 'regex', 'title': '正则表达式', cat: ['other'] }, { 'name': 'regex', 'title': '正则表达式', cat: ['other'] },
{ 'name': 'randomString', 'title': '随机字符生成', cat: ['other'] }, { 'name': 'randomString', 'title': '随机字符生成', cat: ['other'] },
{ 'name': 'phpArraySerialize', 'title': 'PHP数组/序列化', cat: ['conversion','json'] }, {
'name': 'phpArraySerialize',
'title': 'PHP数组/序列化',
cat: ['conversion', 'json'],
},
{ 'name': 'diffs', 'title': '文本差异化对比', cat: ['other'] }, { 'name': 'diffs', 'title': '文本差异化对比', cat: ['other'] },
{ 'name': 'crontab', 'title': 'crontab校验', cat: ['other'] }, { 'name': 'crontab', 'title': 'crontab校验', cat: ['other'] },
{ 'name': 'websocket', 'title': 'websocket调试', cat: ['other'] }, { 'name': 'websocket', 'title': 'websocket调试', cat: ['other'] },
...@@ -49,7 +53,8 @@ const tool = [ ...@@ -49,7 +53,8 @@ const tool = [
// 徽章是否显示 // 徽章是否显示
const badgeIsShow = function () { const badgeIsShow = function () {
return (Date.parse((new Date()).toString()) / 1000) - env('updateTime') < BADGE_EXPIRY * 86400 return (Date.parse((new Date()).toString()) / 1000) - env('updateTime') <
BADGE_EXPIRY * 86400
} }
const getUserCommon = function () { const getUserCommon = function () {
...@@ -58,13 +63,23 @@ const getUserCommon = function () { ...@@ -58,13 +63,23 @@ const getUserCommon = function () {
} }
const setUserCommon = function (tools) { const setUserCommon = function (tools) {
cache.setnNoVersion('user_common', tools) cache.setNoVersion('user_common', tools)
}
const getToolTitle = function (name) {
for (let i = 0; i < tool.length; i++) {
if (tool[i].name === name) {
return tool[i].title
}
}
return ""
} }
export default { export default {
tool, tool,
category, category,
setUserCommon, setUserCommon,
getToolTitle,
getUserCommon, getUserCommon,
getToolByCategory (cat) { getToolByCategory (cat) {
return tool.filter((t) => { return tool.filter((t) => {
...@@ -79,5 +94,5 @@ export default { ...@@ -79,5 +94,5 @@ export default {
}, },
badgeCategoryIsShow (cat) { badgeCategoryIsShow (cat) {
return badgeIsShow() && inArray(cat, BADGE_CATEGORY) return badgeIsShow() && inArray(cat, BADGE_CATEGORY)
} },
} }
\ No newline at end of file
import crypto from 'crypto-js'
import moment from 'moment'
import cache from './cache'
import { TOOL_DATA_EXPIRY } from './config'
let loadHistoryIndex = -1
function queueDataFactory (value) {
return {
'time': moment().format('YYYY-MM-DD HH:mm:ss'),
'hash': crypto.MD5(JSON.stringify(value)).toString(),
'value': value,
}
}
class queue {
data = []
name = ''
max = 10
constructor (name, max = 50) {
this.name = name
this.max = max
// 初始化数据
this.data = cache.get(this.getCacheName(), [])
}
getCacheName () {
return 'tool_data_history_' + this.name
}
push (value) {
let item = queueDataFactory(value)
// 删除已有
for (let i = 0; i < this.data.length; i++) {
if (this.data[i].hash === item.hash) {
this.data.splice(i, 1)
}
}
this.data.unshift(item)
// 删除多余
if (this.length() > this.max) {
this.data.pop()
}
cache.set(this.getCacheName(), this.data, TOOL_DATA_EXPIRY)
}
length () {
return this.data.length
}
all () {
return this.data
}
clear(){
cache.remove(this.getCacheName())
}
get (index) {
return this.data.hasOwnProperty(index) ? this.data[index].value : {}
}
current () {
if (loadHistoryIndex < 0) {
return this.get(0)
}
let index = loadHistoryIndex
loadHistoryIndex = -1
return this.get(index)
}
}
export default (name) => {
return new queue(name)
}
export const setLoadHistoryIndex = (index) => {
loadHistoryIndex = index
}
\ No newline at end of file
import config from "./config" import config from './config'
import {TOOL_DATA_EXPIRY} from "./config" import cache from './cache'
import cache from "./cache" import history from './history.js'
const model = { const model = {
getCategoryHistory() { getCategoryHistory () {
return cache.get("page_category_history", "common") return cache.get('page_category_history', 'common')
}, },
setCategoryHistory(cat) { setCategoryHistory (cat) {
return cache.set("page_category_history", cat) return cache.set('page_category_history', cat)
}, },
getToolHistory(cat) { getToolHistory (cat) {
let all = cache.get("category_tool_history", {}); let all = cache.get('category_tool_history', {})
if (all[cat]) { if (all[cat]) {
return all[cat]; return all[cat]
} }
return config.getToolByCategory(cat)[0]["name"] return config.getToolByCategory(cat)[0]['name']
}, },
setToolHistory(cat, name) { setToolHistory (cat, name) {
let all = cache.get("category_tool_history", {}); let all = cache.get('category_tool_history', {})
all[cat] = name; all[cat] = name
return cache.set("category_tool_history", all) return cache.set('category_tool_history', all)
}, },
getCurrentTool() { getCurrentTool () {
return cache.get("current_tool", "") return cache.get('current_tool', '')
}, },
setCurrentTool(name) { setCurrentTool (name) {
return cache.set("current_tool", name) return cache.set('current_tool', name)
},
getToolData(name) {
return !name ? {} : cache.get("tool_data_" + name, {})
},
setToolData(name, data) {
return cache.set("tool_data_" + name, data, TOOL_DATA_EXPIRY)
} }
}; }
const clipboardPaste = function () { const clipboardPaste = function () {
document.querySelector('#clipboard').innerHTML = '<textarea id="clipboard-text"></textarea>'; document.querySelector(
document.querySelector('#clipboard-text').select(); '#clipboard').innerHTML = '<textarea id="clipboard-text"></textarea>'
document.execCommand('paste'); document.querySelector('#clipboard-text').select()
let r = document.querySelector('#clipboard-text').value || document.querySelector('#clipboard-text').innerHTML; document.execCommand('paste')
document.querySelector('#clipboard').innerHTML = ""; let r = document.querySelector('#clipboard-text').value ||
return r ? r : "" document.querySelector('#clipboard-text').innerHTML
}; document.querySelector('#clipboard').innerHTML = ''
return r ? r : ''
}
export const plugin = { export const plugin = {
install: function (Vue) { install: function (Vue) {
Vue.prototype.$getToolData = function (clipboardField = "") { Vue.prototype.$getToolData = function (clipboardField = '') {
let data = model.getToolData(model.getCurrentTool()); let data = history(model.getCurrentTool()).current()
let paste = clipboardPaste(); let paste = clipboardPaste()
if (clipboardField && !data[clipboardField] && paste){ if (clipboardField && !data[clipboardField] && paste) {
data[clipboardField] = paste; data[clipboardField] = paste
} }
return data; return data
}; }
Vue.prototype.$saveToolData = function (data) { Vue.prototype.$saveToolData = function (data) {
return model.setToolData(model.getCurrentTool(), data) return history(model.getCurrentTool()).push(data)
}; }
Vue.prototype.$clipboardCopy = function (data) { Vue.prototype.$clipboardCopy = function (data) {
if (!data) return; if (!data) return
document.querySelector('#clipboard').innerHTML = '<textarea id="clipboard-text"></textarea>'; document.querySelector(
document.querySelector('#clipboard-text').value = data; '#clipboard').innerHTML = '<textarea id="clipboard-text"></textarea>'
document.querySelector('#clipboard-text').select(); document.querySelector('#clipboard-text').value = data
document.querySelector('#clipboard-text').select()
if (document.execCommand('copy')) { if (document.execCommand('copy')) {
this.$Message.success("结果已复制 ^o^") this.$Message.success('结果已复制 ^o^')
} }
document.querySelector('#clipboard').innerHTML = ""; document.querySelector('#clipboard').innerHTML = ''
}; }
} },
}; }
export default model export default model
\ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
this.current = Object.assign(this.current, this.$getToolData('content')) this.current = Object.assign(this.current, this.$getToolData('content'))
}, },
mounted(){ mounted(){
this.codemirror.setSize(null, 350) this.codemirror.setSize(null, window.innerHeight - 200)
}, },
computed: { computed: {
codemirror() { codemirror() {
......
...@@ -9,18 +9,6 @@ ...@@ -9,18 +9,6 @@
<FormItem> <FormItem>
<Button type="primary" @click="generate()">生成</Button> <Button type="primary" @click="generate()">生成</Button>
</FormItem> </FormItem>
<FormItem v-if="generateHistory.length() > 0">
<Dropdown placement="top-start" trigger="click" style="margin-left: 10px" @on-click="history">
<a href="javascript:void(0)">
历史记录
<Icon type="ios-arrow-down"></Icon>
</a>
<DropdownMenu slot="list">
<DropdownItem v-for="(v,i) in generateHistory.lists()" :key="i" :name="i">{{substr(v.input)}}</DropdownItem>
<DropdownItem divided name="clear">清空历史记录</DropdownItem>
</DropdownMenu>
</Dropdown>
</FormItem>
</option-block> </option-block>
</Col> </Col>
<Col span="10"> <Col span="10">
...@@ -53,57 +41,8 @@ ...@@ -53,57 +41,8 @@
<script> <script>
import generator from 'qrcode' import generator from 'qrcode'
import qrcodeParser from 'qrcode-parser' import qrcodeParser from 'qrcode-parser'
import cache from '../../tool/cache'
import { trim } from '../../helper' import { trim } from '../../helper'
const generateHistoryCacheName = 'qrCodeGenerateHistoryCacheName'
const generateHistoryMaxLength = 15
class generateHistory {
data = []
constructor () {
this.data = cache.get(generateHistoryCacheName, [])
}
find (value) {
for (let i = 0; i < this.data.length; i++) {
if (this.data[i].input === value.input && this.data[i].isShort === value.isShort) {
return true
}
}
return false
}
push (value) {
if (this.find(value)) {
return
}
if (this.data.length > generateHistoryMaxLength) {
this.data.pop()
}
this.data.push(value)
cache.set(generateHistoryCacheName, this.data, 86400)
}
getValue (index) {
return this.data[index]
}
lists () {
return this.data
}
length () {
return this.data.length
}
clear () {
this.data = []
cache.remove(generateHistoryCacheName)
}
}
export default { export default {
computed: { computed: {
readerInputImg () { readerInputImg () {
...@@ -114,27 +53,12 @@ ...@@ -114,27 +53,12 @@
}, },
}, },
created () { created () {
this.generateHistory = new generateHistory()
this.current = Object.assign(this.current, this.$getToolData()) this.current = Object.assign(this.current, this.$getToolData())
}, },
methods: { methods: {
history (index) { generate () {
if (index === 'clear') {
this.generateHistory.clear()
return
}
let history = this.generateHistory.getValue(index)
this.current.generateInput = history.input
this.generate(false)
},
generate (insertHistory = true) {
if (!this.current.generateInput) return if (!this.current.generateInput) return
this.generateHandle(this.current.generateInput) this.generateHandle(this.current.generateInput)
if (insertHistory) {
this.generateHistory.push({
input: this.current.generateInput
})
}
this.$saveToolData(this.current) this.$saveToolData(this.current)
}, },
reader () { reader () {
...@@ -173,7 +97,6 @@ ...@@ -173,7 +97,6 @@
}, },
data () { data () {
return { return {
generateHistory: {},
current: { current: {
generateInput: '', generateInput: '',
generateOutput: '', generateOutput: '',
......
...@@ -134,7 +134,6 @@ ...@@ -134,7 +134,6 @@
this.$saveToolData(history) this.$saveToolData(history)
}, },
getToolData () { getToolData () {
console.log(this.$getToolData())
let type = this.current.type let type = this.current.type
let history = this.$getToolData() let history = this.$getToolData()
let unitHistory = history['data'] && history['data'][type] ? history['data'][type] : null let unitHistory = history['data'] && history['data'][type] ? history['data'][type] : null
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册