From 3e67f3bc4c15d56399bd6162399acfd770eed6d5 Mon Sep 17 00:00:00 2001 From: AKING <2734339436@qq.com> Date: Thu, 31 Aug 2023 03:50:51 +0000 Subject: [PATCH 01/16] =?UTF-8?q?update=20src/hooks/web/useCrudSchemas.ts.?= =?UTF-8?q?=20=20=E8=A7=A3=E5=86=B3=E4=BA=86=E5=BD=93=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=9A=84dict=E9=80=89=E9=A1=B9=E6=97=B6?= =?UTF-8?q?=EF=BC=8Cform=E4=B8=AD=E4=BA=8B=E4=BB=B6=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AKING <2734339436@qq.com> --- src/hooks/web/useCrudSchemas.ts | 44 +++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/src/hooks/web/useCrudSchemas.ts b/src/hooks/web/useCrudSchemas.ts index 4cfe1eaf..458b57ec 100644 --- a/src/hooks/web/useCrudSchemas.ts +++ b/src/hooks/web/useCrudSchemas.ts @@ -9,7 +9,7 @@ import { TableColumn } from '@/types/table' import { DescriptionsSchema } from '@/types/descriptions' import { ComponentOptions, ComponentProps } from '@/types/components' import { DictTag } from '@/components/DictTag' -import { cloneDeep } from 'lodash-es' +import { cloneDeep, merge } from 'lodash-es' export type CrudSchema = Omit & { isSearch?: boolean // 是否在查询显示 @@ -117,14 +117,18 @@ const filterSearchSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): F } if (!schemaItem.search?.component) component = 'Select' } - const searchSchemaItem = { - // 默认为 input - component: component, - componentProps: comonentProps, - ...schemaItem.search, - field: schemaItem.field, - label: schemaItem.search?.label || schemaItem.label - } + + // updated by AKing: 解决了当使用默认的dict选项时,form中事件不能触发的问题 + const searchSchemaItem = merge( + { + // 默认为 input + component, + ...schemaItem.search, + field: schemaItem.field, + label: schemaItem.search?.label || schemaItem.label + }, + { componentProps: comonentProps } + ) if (searchSchemaItem.api) { searchRequestTask.push(async () => { const res = await (searchSchemaItem.api as () => AxiosPromise)() @@ -224,15 +228,19 @@ const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): For } if (!(schemaItem.form && schemaItem.form.component)) component = 'Select' } - const formSchemaItem = { - // 默认为 input - component: component, - componentProps: comonentProps, - value: defaultValue, - ...schemaItem.form, - field: schemaItem.field, - label: schemaItem.form?.label || schemaItem.label - } + + // updated by AKing: 解决了当使用默认的dict选项时,form中事件不能触发的问题 + const formSchemaItem = merge( + { + // 默认为 input + component, + value: defaultValue, + ...schemaItem.form, + field: schemaItem.field, + label: schemaItem.form?.label || schemaItem.label + }, + { componentProps: comonentProps } + ) if (formSchemaItem.api) { formRequestTask.push(async () => { From d74f96fe17fa6a64532bd055df2a8ecc8a603636 Mon Sep 17 00:00:00 2001 From: AKING <2734339436@qq.com> Date: Mon, 4 Sep 2023 03:31:35 +0000 Subject: [PATCH 02/16] =?UTF-8?q?update=20src/components/Dialog/src/Dialog?= =?UTF-8?q?.vue.=20=E8=A7=A3=E5=86=B3=E4=BA=86=E5=BC=B9=E7=AA=97=E9=BB=98?= =?UTF-8?q?=E8=AE=A4top=E4=B8=BA0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AKING <2734339436@qq.com> --- src/components/Dialog/src/Dialog.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Dialog/src/Dialog.vue b/src/components/Dialog/src/Dialog.vue index 302168ca..e1036757 100644 --- a/src/components/Dialog/src/Dialog.vue +++ b/src/components/Dialog/src/Dialog.vue @@ -66,7 +66,6 @@ const dialogStyle = computed(() => { destroy-on-close lock-scroll draggable - top="0" class="com-dialog" :show-close="false" > From a1ce9eda2a7d707df6e2d4757e0b3010f8adf20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=81=E6=9C=88=E4=B8=8D=E7=BB=8F=E8=B0=88?= <473831241@qq.com> Date: Tue, 5 Sep 2023 10:14:42 +0000 Subject: [PATCH 03/16] =?UTF-8?q?update=20src/views/system/user/DeptTree.v?= =?UTF-8?q?ue=20=E9=83=A8=E9=97=A8=E6=A0=91=E8=8A=82=E7=82=B9=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E4=B8=8D=E7=94=9F=E6=95=88=20=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E6=A0=91=E8=8A=82=E7=82=B9=E8=BF=87=E6=BB=A4=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 岁月不经谈 <473831241@qq.com> --- src/views/system/user/DeptTree.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/system/user/DeptTree.vue b/src/views/system/user/DeptTree.vue index bd8cc575..ab8ba06f 100644 --- a/src/views/system/user/DeptTree.vue +++ b/src/views/system/user/DeptTree.vue @@ -51,6 +51,11 @@ const handleNodeClick = async (row: { [key: string]: any }) => { } const emits = defineEmits(['node-click']) +/** 监听deptName */ +watch(deptName, (val) => { + treeRef.value!.filter(val) +}) + /** 初始化 */ onMounted(async () => { await getTree() From 4c5d0392d71f34aa3fb1c6e6ee694fad0094a1fe Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 11 Sep 2023 16:22:05 +0800 Subject: [PATCH 04/16] chore: vscode setting --- .vscode/settings.json | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3a9abed7..b2377718 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,5 @@ { "typescript.tsdk": "./node_modules/typescript/lib", - "volar.tsPlugin": true, - "volar.tsPluginStatus": false, "npm.packageManager": "pnpm", "editor.tabSize": 2, "prettier.printWidth": 100, // 超过最大值换行 @@ -133,27 +131,6 @@ "sider", "pnpm" ], - "vetur.format.scriptInitialIndent": true, - "vetur.format.styleInitialIndent": true, - "vetur.validation.script": false, - "MicroPython.executeButton": [ - { - "text": "▶", - "tooltip": "运行", - "alignment": "left", - "command": "extension.executeFile", - "priority": 3.5 - } - ], - "MicroPython.syncButton": [ - { - "text": "$(sync)", - "tooltip": "同步", - "alignment": "left", - "command": "extension.execute", - "priority": 4 - } - ], // 控制相关文件嵌套展示 "explorer.fileNesting.enabled": true, "explorer.fileNesting.expand": false, @@ -161,7 +138,8 @@ "*.ts": "$(capture).test.ts, $(capture).test.tsx", "*.tsx": "$(capture).test.ts, $(capture).test.tsx", "*.env": "$(capture).env.*", - "package.json": "pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.gitignore,prettier.config.js,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore" + "package.json": "pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.eslintrc-auto-import.json,.gitignore,prettier.config.js,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore" }, - "terminal.integrated.scrollback": 10000 + "terminal.integrated.scrollback": 10000, + "nuxt.isNuxtApp": false } From 4664014fc4e065031f31e585b4a85b85bc2d5230 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 11 Sep 2023 16:22:11 +0800 Subject: [PATCH 05/16] chore: update deps --- package.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 798aa6d1..d19cede2 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "qrcode": "^1.5.3", "qs": "^6.11.2", "steady-xml": "^0.1.0", - "url": "^0.11.1", + "url": "^0.11.2", "video.js": "^7.21.5", "vue": "3.3.4", "vue-dompurify-html": "^4.1.4", @@ -73,50 +73,50 @@ "devDependencies": { "@commitlint/cli": "^17.7.1", "@commitlint/config-conventional": "^17.7.0", - "@iconify/json": "^2.2.107", - "@intlify/unplugin-vue-i18n": "^0.12.3", + "@iconify/json": "^2.2.114", + "@intlify/unplugin-vue-i18n": "^1.0.1", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.1", - "@types/lodash-es": "^4.17.8", - "@types/node": "^20.5.0", + "@types/lodash-es": "^4.17.9", + "@types/node": "^20.6.0", "@types/nprogress": "^0.2.0", - "@types/qrcode": "^1.5.1", - "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", - "@unocss/transformer-variant-group": "^0.55.3", + "@types/qrcode": "^1.5.2", + "@types/qs": "^6.9.8", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "@unocss/transformer-variant-group": "^0.55.7", "@vitejs/plugin-legacy": "^4.1.1", - "@vitejs/plugin-vue": "^4.3.3", + "@vitejs/plugin-vue": "^4.3.4", "@vitejs/plugin-vue-jsx": "^3.0.2", - "@vue-macros/volar": "^0.14.2", + "@vue-macros/volar": "^0.14.3", "autoprefixer": "^10.4.15", "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", "consola": "^3.2.3", - "eslint": "^8.48.0", + "eslint": "^8.49.0", "eslint-config-prettier": "^9.0.0", "eslint-define-config": "^1.23.0", "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-vue": "^9.17.0", "lint-staged": "^14.0.1", - "postcss": "^8.4.28", + "postcss": "^8.4.29", "postcss-html": "^1.5.0", - "postcss-scss": "^4.0.7", - "prettier": "^3.0.2", + "postcss-scss": "^4.0.8", + "prettier": "^3.0.3", "rimraf": "^5.0.1", - "rollup": "^3.28.1", + "rollup": "^3.29.1", "sass": "^1.66.1", "stylelint": "^15.10.3", "stylelint-config-html": "^1.1.0", "stylelint-config-recommended": "^13.0.0", "stylelint-config-standard": "^34.0.0", "stylelint-order": "^6.0.3", - "terser": "^5.19.2", + "terser": "^5.19.4", "typescript": "5.1.6", - "unocss": "^0.55.3", + "unocss": "^0.55.7", "unplugin-auto-import": "^0.16.6", "unplugin-element-plus": "^0.8.0", - "unplugin-vue-components": "^0.25.1", + "unplugin-vue-components": "^0.25.2", "vite": "4.4.9", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", @@ -126,7 +126,7 @@ "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-top-level-await": "^1.3.1", "vue-eslint-parser": "^9.3.1", - "vue-tsc": "^1.8.8" + "vue-tsc": "^1.8.10" }, "license": "MIT", "repository": { From 8f0c6625de43d5ba72ed1510323c9399a2bb8f20 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 11 Sep 2023 16:23:31 +0800 Subject: [PATCH 06/16] docs: update version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e6a43e0..7966b7e8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## 🐶 新手必读 -* nodejs > 16.0.0 && pnpm > 8.6.0 (强制使用pnpm) +* nodejs > 16.18.0 && pnpm > 8.6.0 (强制使用pnpm) * 演示地址【Vue3 + element-plus】: * 演示地址【Vue3 + vben(ant-design-vue)】: * 演示地址【Vue2 + element-ui】: @@ -46,7 +46,7 @@ | [vueuse](https://vueuse.org/) | 常用工具集 | 10.4.1 | | [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 | | [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.2.4 | -| [unocss](https://uno.antfu.me/) | 原子 css | 0.55.3 | +| [unocss](https://uno.antfu.me/) | 原子 css | 0.55.7 | | [iconify](https://icon-sets.iconify.design/) | 在线图标库 | 3.1.1 | | [wangeditor](https://www.wangeditor.com/) | 富文本编辑器 | 5.1.23 | From 1fe950aea58664413a50688067223bcee942550b Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 11 Sep 2023 16:47:19 +0800 Subject: [PATCH 07/16] chore: 1.8.1-snapshot --- package.json | 6 +++--- tsconfig.json | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d19cede2..120c8357 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yudao-ui-admin-vue3", - "version": "1.8.0-snapshot", + "version": "1.8.1-snapshot", "description": "基于vue3、vite4、element-plus、typesScript", "author": "xingyu", "private": false, @@ -27,8 +27,8 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.1.0", - "@form-create/designer": "^3.1.0", - "@form-create/element-ui": "^3.1.17", + "@form-create/designer": "^3.1.3", + "@form-create/element-ui": "^3.1.24", "@iconify/iconify": "^3.1.1", "@videojs-player/vue": "^1.0.0", "@vueuse/core": "^10.4.1", diff --git a/tsconfig.json b/tsconfig.json index d2909a8a..1ee23774 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,8 +29,7 @@ "element-plus/global", "@types/intro.js", "@types/qrcode", - "vite-plugin-svg-icons/client", - "@form-create/element-ui/types" + "vite-plugin-svg-icons/client" ], "outDir": "target", // 请保留这个属性,防止tsconfig.json文件报错 "typeRoots": ["./node_modules/@types/", "./types"] From 9a6d29b2959acb8e8b7c3849fbbf032dab9539a9 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 11 Sep 2023 16:54:34 +0800 Subject: [PATCH 08/16] fix: avatar --- src/components/Cropper/src/CropperAvatar.vue | 4 ++-- src/layout/components/UserInfo/src/UserInfo.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Cropper/src/CropperAvatar.vue b/src/components/Cropper/src/CropperAvatar.vue index 414ba144..55a7d34b 100644 --- a/src/components/Cropper/src/CropperAvatar.vue +++ b/src/components/Cropper/src/CropperAvatar.vue @@ -1,7 +1,7 @@