From 44f51ab6cb0024177befdf346258e4efd5b937f7 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Tue, 24 Oct 2023 20:23:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E9=A1=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A2=9C=E8=89=B2=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/dict/components/DictItemModal.vue | 65 ++++++++++++++++++- src/views/system/dict/dict.data.ts | 19 ++++++ 2 files changed, 83 insertions(+), 1 deletion(-) 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',