From 25cccb5d87bb1896eb8512bd6b019e35d4eda603 Mon Sep 17 00:00:00 2001 From: ray <1490493387@qq.com> Date: Wed, 23 Oct 2024 00:54:10 +0800 Subject: [PATCH 001/497] =?UTF-8?q?refactor:=20:recycle:=20=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E9=80=89=E6=8B=A9=E5=99=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/IconSelect/index.vue | 202 ++++++++++++++-------------- src/views/demo/icon-selector.vue | 18 +++ 2 files changed, 118 insertions(+), 102 deletions(-) create mode 100644 src/views/demo/icon-selector.vue diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue index 2227d188..e7dfbf22 100644 --- a/src/components/IconSelect/index.vue +++ b/src/components/IconSelect/index.vue @@ -1,44 +1,47 @@ From 71335e5287704c78ac7efad49ce6dd4dd33cdfc7 Mon Sep 17 00:00:00 2001 From: ray <1490493387@qq.com> Date: Wed, 23 Oct 2024 01:01:27 +0800 Subject: [PATCH 003/497] =?UTF-8?q?chore:=20:hammer:=20upgrade=20vesion=20?= =?UTF-8?q?2.18.0=20=E2=86=92=202.18.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a8b35f9e..1d536094 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue3-element-admin", - "version": "2.18.0", + "version": "2.18.1", "private": true, "type": "module", "scripts": { From ca81612981858298f46f8e525e8113924c01741f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=91=E7=BF=94?= <971366405@qq.com> Date: Wed, 23 Oct 2024 10:46:41 +0800 Subject: [PATCH 004/497] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E9=80=89=E5=8F=96=E7=BB=84=E4=BB=B6=E5=92=8C?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E5=A4=8D=E9=80=89=E7=BB=84=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E4=BD=BF=E7=94=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复图标选取组件和字典复选组件的使用bug --- src/components/Dict/index.vue | 2 +- src/components/IconSelect/index.vue | 5 ++++- src/views/demo/dictionary.vue | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/Dict/index.vue b/src/components/Dict/index.vue index bf48b873..1a6b931c 100644 --- a/src/components/Dict/index.vue +++ b/src/components/Dict/index.vue @@ -123,7 +123,7 @@ watch( const matchedOption = newOptions.find( (option) => option.value === selectedValue.value ); - if (!matchedOption) { + if (!matchedOption && props.type !== "checkbox") { selectedValue.value = ""; // 如果找不到匹配项,清空选中 } } diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue index e7dfbf22..64336f16 100644 --- a/src/components/IconSelect/index.vue +++ b/src/components/IconSelect/index.vue @@ -111,12 +111,15 @@ const elementIcons = ref(Object.keys(ElementPlusIconsVue)); const selectedIcon = defineModel("modelValue", { type: String, required: true, + default: "", }); const filterText = ref(""); const filteredSvgIcons = ref([]); const filteredElementIcons = ref(elementIcons.value); -const isElementIcon = computed(() => selectedIcon.value.startsWith("el-icon-")); +const isElementIcon = computed(() => { + return selectedIcon.value && selectedIcon.value.startsWith("el-icon"); +}); function loadIcons() { const icons = import.meta.glob("../../assets/icons/*.svg"); diff --git a/src/views/demo/dictionary.vue b/src/views/demo/dictionary.vue index da817faf..b34d653c 100644 --- a/src/views/demo/dictionary.vue +++ b/src/views/demo/dictionary.vue @@ -2,7 +2,7 @@