From 9fa1c73485c15e71b64a636c24388484ec2592a4 Mon Sep 17 00:00:00 2001 From: mkppo <17605043035@163.com> Date: Wed, 8 Dec 2021 11:38:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc | 1 - build/plugins/cool.ts | 8 +- package.json | 7 +- src/assets/css/element.scss | 3 +- src/cool/core/service/index.ts | 2 - .../modules/base/components/dept/move.tsx | 6 +- .../modules/base/components/dept/tree.vue | 7 +- .../modules/base/components/menu/quick.vue | 3 +- .../base/components/menu/slider/index.tsx | 3 +- .../modules/base/components/menu/tree.vue | 5 +- .../modules/base/components/role/perms.vue | 5 +- .../modules/base/components/role/select.vue | 5 +- .../modules/base/components/switch/index.vue | 2 +- .../base/pages/login/components/captcha.vue | 5 +- src/cool/modules/base/pages/login/index.vue | 3 +- src/cool/modules/base/views/param.vue | 4 +- src/cool/modules/base/views/role.vue | 9 +- src/cool/modules/base/views/user.vue | 6 +- .../modules/task/components/cron/index.tsx | 6 +- src/shims-vue.d.ts | 5 - vite.config.ts | 5 +- yarn.lock | 240 +----------------- 22 files changed, 57 insertions(+), 283 deletions(-) diff --git a/.prettierrc b/.prettierrc index b82b0c6..ee44e11 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,7 +2,6 @@ "tabWidth": 4, "useTabs": true, "semi": true, - "jsxBracketSameLine": true, "singleQuote": false, "printWidth": 100, "trailingComma": "none" diff --git a/build/plugins/cool.ts b/build/plugins/cool.ts index 89fe7e4..5efc6df 100644 --- a/build/plugins/cool.ts +++ b/build/plugins/cool.ts @@ -53,14 +53,13 @@ const handler = { return d; }); - const d = { + const d: any = { table: { label, dict: list }, form: { label, - value: list[0]?.value, component: { name: "", options: list @@ -68,6 +67,11 @@ const handler = { } }; + // 默认值 + if (list[0]) { + d.form.value = list[0].value; + } + // 匹配组件 d.form.component.name = arr.length > 4 ? "el-select" : "el-radio-group"; diff --git a/package.json b/package.json index fa7750f..071cf84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "front-next", - "version": "4.0.0", + "version": "4.0.1", "scripts": { "dev": "vite --host", "build": "vite build", @@ -13,20 +13,15 @@ "array.prototype.flat": "^1.2.4", "axios": "^0.21.1", "clipboard": "^2.0.8", - "clone-deep": "^4.0.1", "codemirror": "^5.62.0", "core-js": "^3.6.5", "echarts": "^5.0.2", "element-plus": "^1.1.0-beta.20", "file-saver": "^2.0.5", - "glob": "^7.1.6", "js-beautify": "^1.13.5", - "merge": "^2.1.1", - "merge-deep": "^3.0.3", "mitt": "^2.1.0", "mockjs": "^1.1.0", "nprogress": "^0.2.0", - "qrcode": "^1.4.4", "quill": "^1.3.7", "socket.io-client": "^4.1.2", "store": "^2.0.12", diff --git a/src/assets/css/element.scss b/src/assets/css/element.scss index ceaa164..6cea1c0 100644 --- a/src/assets/css/element.scss +++ b/src/assets/css/element.scss @@ -23,10 +23,9 @@ $--colors: ( ); @forward "element-plus/theme-chalk/src/common/var.scss" with ( - $colors: $--colors, + $colors: $--colors ); - :export { colorPrimary: $color-primary; colorSuccess: $color-success; diff --git a/src/cool/core/service/index.ts b/src/cool/core/service/index.ts index 9d2c788..896d41c 100644 --- a/src/cool/core/service/index.ts +++ b/src/cool/core/service/index.ts @@ -129,8 +129,6 @@ function useEps() { }); } - console.log(service); - return res; }) .catch((err: string) => { diff --git a/src/cool/modules/base/components/dept/move.tsx b/src/cool/modules/base/components/dept/move.tsx index a2db123..e519293 100644 --- a/src/cool/modules/base/components/dept/move.tsx +++ b/src/cool/modules/base/components/dept/move.tsx @@ -97,7 +97,8 @@ export default defineComponent({ border: "1px solid #eee", borderRadius: "3px", padding: "2px" - }}> + }} + > { scope["dept"] = e; - }}> + }} + > ); } diff --git a/src/cool/modules/base/components/dept/tree.vue b/src/cool/modules/base/components/dept/tree.vue index 0136e23..0ed867b 100644 --- a/src/cool/modules/base/components/dept/tree.vue +++ b/src/cool/modules/base/components/dept/tree.vue @@ -61,7 +61,7 @@