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 }}
子级
+
+ {{ record.dictLabel }}
+
编辑