From 1026bd4e7ac0b83d51d63511ab23c0dafa57f910 Mon Sep 17 00:00:00 2001 From: CyberShen123 Date: Sat, 18 Oct 2025 10:23:40 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=9B=B4=E6=96=B0=E3=80=91=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=AD=97=E5=85=B8=E8=AE=BE=E5=AE=9A=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snowy-admin-web/src/views/dev/dict/category/form.vue | 11 +++++++++++ snowy-admin-web/src/views/dev/dict/category/index.vue | 11 +++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/snowy-admin-web/src/views/dev/dict/category/form.vue b/snowy-admin-web/src/views/dev/dict/category/form.vue index ff117f00..77fa621f 100644 --- a/snowy-admin-web/src/views/dev/dict/category/form.vue +++ b/snowy-admin-web/src/views/dev/dict/category/form.vue @@ -36,6 +36,13 @@ :disabled="formData.parentId === '0'" /> + + + + {{ item }} + + + @@ -63,6 +70,9 @@ // 默认展开的节点(顶级) const defaultExpandedKeys = ref([0]) + // 定义字典颜色 + const dictColorList = ['default','pink', 'red', 'orange', 'green', 'cyan', 'blue', 'purple','gold','geekblue','volcano','magenta','processing','success','error','warning'] + // 打开抽屉 const onOpen = (record, type, parentId) => { visible.value = true @@ -100,6 +110,7 @@ const formRules = { dictLabel: [required('请输入字典名称')], dictValue: [required('请选择字典值')], + dictColor: [required('请选择字典颜色')], sortCode: [required('请选择排序')] } // 表单固定label实现 diff --git a/snowy-admin-web/src/views/dev/dict/category/index.vue b/snowy-admin-web/src/views/dev/dict/category/index.vue index 3ae1a9ec..7859c93d 100644 --- a/snowy-admin-web/src/views/dev/dict/category/index.vue +++ b/snowy-admin-web/src/views/dev/dict/category/index.vue @@ -27,10 +27,10 @@ allow-clear :tree-data="treeData" :field-names="{ - children: 'children', - label: 'name', - value: 'id' - }" + children: 'children', + label: 'name', + value: 'id' + }" selectable="false" tree-line /> @@ -84,6 +84,9 @@ {{ record.level }} 子级 +