diff --git a/src/views/system/dict/components/DictItemModal.vue b/src/views/system/dict/components/DictItemModal.vue index 1fea1c8..b80ec77 100644 --- a/src/views/system/dict/components/DictItemModal.vue +++ b/src/views/system/dict/components/DictItemModal.vue @@ -1,6 +1,22 @@ + diff --git a/src/views/system/dict/dict.data.ts b/src/views/system/dict/dict.data.ts index bd0b77d..ccbcc0d 100644 --- a/src/views/system/dict/dict.data.ts +++ b/src/views/system/dict/dict.data.ts @@ -2,6 +2,8 @@ import { BasicColumn } from '/@/components/Table'; import { FormSchema } from '/@/components/Table'; import { dictItemCheck } from './dict.api'; import { rules } from '/@/utils/helper/validator'; +import { h } from "vue"; + export const columns: BasicColumn[] = [ { title: '字典名称', @@ -93,6 +95,17 @@ export const dictItemColumns: BasicColumn[] = [ dataIndex: 'itemValue', width: 80, }, + { + title: '字典颜色', + dataIndex: 'itemColor', + width: 80, + align:'center', + customRender:({ text }) => { + return h('div', { + style: {"background": text, "width":"18px","height":"18px","border-radius":"50%","margin":"0 auto"} + }) + } + }, ]; export const dictItemSearchFormSchema: FormSchema[] = [ @@ -159,6 +172,12 @@ export const itemFormSchema: FormSchema[] = [ ]; }, }, + { + label: '颜色值', + field: 'itemColor', + component: 'Input', + slot:'itemColor' + }, { label: '描述', field: 'description',