diff --git a/package-lock.json b/package-lock.json index 50a03afbb1dbe467331c246db3e79fa7e2150725..afb83b0241720074ac80e1898d3b8b8f8a5e8e70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "c-tool", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3414,11 +3414,6 @@ "integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=", "dev": true }, - "async-validator": { - "version": "1.12.2", - "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.12.2.tgz", - "integrity": "sha1-vq5nHnF00pOLe0tp0vt+cit/1yw=" - }, "asynckit": { "version": "0.4.0", "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", @@ -8479,28 +8474,6 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, - "iview": { - "version": "3.5.4", - "resolved": "https://registry.npm.taobao.org/iview/download/iview-3.5.4.tgz", - "integrity": "sha1-1Ra5LnO2F/Lcf0WDH5kFnWmTL4I=", - "requires": { - "async-validator": "^1.12.2", - "deepmerge": "^2.2.1", - "element-resize-detector": "^1.2.0", - "js-calendar": "^1.2.3", - "lodash.throttle": "^4.1.1", - "popper.js": "^1.14.6", - "tinycolor2": "^1.4.1", - "v-click-outside-x": "^4.0.19" - }, - "dependencies": { - "deepmerge": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-2.2.1.tgz", - "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=" - } - } - }, "javascript-stringify": { "version": "1.6.0", "resolved": "http://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-1.6.0.tgz", @@ -8508,9 +8481,9 @@ "dev": true }, "js-base64": { - "version": "2.6.2", - "resolved": "https://registry.npm.taobao.org/js-base64/download/js-base64-2.6.2.tgz?cache=0&sync_timestamp=1593072135380&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-base64%2Fdownload%2Fjs-base64-2.6.2.tgz", - "integrity": "sha1-z5MBvFzHVokqmmyNcTgyLllE+w0=" + "version": "2.6.3", + "resolved": "https://registry.npm.taobao.org/js-base64/download/js-base64-2.6.3.tgz?cache=0&sync_timestamp=1594230799738&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-base64%2Fdownload%2Fjs-base64-2.6.3.tgz", + "integrity": "sha1-ev25tXqncX4V03C2bo82qcuDXcM=" }, "js-calendar": { "version": "1.2.3", @@ -12921,11 +12894,6 @@ "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", "dev": true }, - "v-click-outside-x": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/v-click-outside-x/download/v-click-outside-x-4.1.0.tgz", - "integrity": "sha1-voJmgOLSVmaooYUzKSnUYkSqJEc=" - }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "http://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz", @@ -12959,6 +12927,38 @@ "extsprintf": "^1.2.0" } }, + "view-design": { + "version": "4.3.1", + "resolved": "https://registry.npm.taobao.org/view-design/download/view-design-4.3.1.tgz", + "integrity": "sha1-sPnfnaGqN/RG5aD2JB5elFMN5GA=", + "requires": { + "async-validator": "^3.3.0", + "deepmerge": "^2.2.1", + "element-resize-detector": "^1.2.0", + "js-calendar": "^1.2.3", + "lodash.throttle": "^4.1.1", + "popper.js": "^1.14.6", + "tinycolor2": "^1.4.1", + "v-click-outside-x": "^3.7.1" + }, + "dependencies": { + "async-validator": { + "version": "3.3.0", + "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-3.3.0.tgz", + "integrity": "sha1-HZIZO75g1tbIskZpLHAF6e0UqO4=" + }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=" + }, + "v-click-outside-x": { + "version": "3.7.1", + "resolved": "https://registry.npm.taobao.org/v-click-outside-x/download/v-click-outside-x-3.7.1.tgz", + "integrity": "sha1-qgPqoOQeRMtSB9z4bC2fDdZAhME=" + } + } + }, "vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz", diff --git a/package.json b/package.json index 1964a8e2a4aea03b044054e60a58fc53357bed1f..cd1f76bca790606d659cd29f66342f55e2479ad3 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,7 @@ "diff": "^4.0.2", "ipinyinjs": "^1.0.0", "is-url": "^1.2.4", - "iview": "^3.5.4", - "js-base64": "^2.6.2", + "js-base64": "^2.6.3", "lscache": "^1.3.0", "moment": "^2.27.0", "php-array-reader": "^1.2.0", @@ -28,6 +27,7 @@ "query-string": "^6.13.1", "radix.js": "0.0.1", "serialize-php": "^1.1.2", + "view-design": "^4.0.0", "vue": "^2.6.11", "vue-prismjs": "^1.2.0", "vue-router": "^3.3.4" diff --git a/public/tool.html b/public/tool.html index 6910afb39996508e94deeb4c020a728b73d3898f..1bac150722908f26c3a2138a13bee6fd62abe731 100644 --- a/public/tool.html +++ b/public/tool.html @@ -6,9 +6,10 @@ Ctool 程序开发常用工具 - -
+ +
+
diff --git a/src/setting.js b/src/setting.js new file mode 100644 index 0000000000000000000000000000000000000000..19447d49ee02aff8339d7535d410f3d8c41371d7 --- /dev/null +++ b/src/setting.js @@ -0,0 +1,12 @@ +import Vue from 'vue' +import ViewUI from 'view-design'; +import 'view-design/dist/styles/iview.css'; +import App from './setting.vue' + +Vue.config.productionTip = false; + +Vue.use(ViewUI); + +new Vue({ + render: h => h(App) +}).$mount('#app'); diff --git a/src/tool.js b/src/tool.js index 8524329d94bf5c67798eafa510711cd1178a5013..38022adbcdd2a1e63be2b3139672aa4239bf9923 100644 --- a/src/tool.js +++ b/src/tool.js @@ -1,57 +1,20 @@ import Vue from 'vue' -import ViewUI from 'view-design' -import './statics/theme.less' +import ViewUI from 'view-design'; +import 'view-design/dist/styles/iview.css'; import router from './tool.router' import optionBlock from './components/optionBlock' -import inputBlock from './components/inputBlock' +import codeHighlight from './components/codeHighlight' import {plugin as modelPlugin} from './tool/model' -import cache from './tool/cache' -import setting from './tool/setting' import App from './tool.vue' -import {isUtools,setDisplayMode,isWeb} from './helper' -import {setCurrentLocale,i18n} from "./i18n"; -const run = () => { - // 设置语言环境 - setCurrentLocale(setting.locale()) - // 设置显示模式 - setDisplayMode(setting.displayMode()) - - Vue.config.productionTip = false - - Vue.use(ViewUI) - Vue.use(modelPlugin) - Vue.component('option-block', optionBlock); - Vue.component('input-block', inputBlock); - - new Vue({ - i18n, - router, - render: h => h(App), - }).$mount('#app') - - // 清理缓存数据 - setTimeout(() => { - cache.clear() - }, 500) -} - -(function () { - if (document.body.clientWidth > 900 || isUtools || isWeb) { - const page = document.getElementById('page') - page.style.width = 'auto' - page.style.height = 'auto' - page.style.minHeight = '550px' - } - if (isUtools) { - window.utools.onPluginReady(() => { - // 重设高度 - window.utools.setExpendHeight(582) - run() - }) - } else { - run() - } -})() +Vue.config.productionTip = false; +Vue.use(ViewUI); +Vue.use(modelPlugin); +Vue.component('option-block',optionBlock); +Vue.component('code-highlight',codeHighlight); +new Vue({ + router, + render: h => h(App) +}).$mount('#app');