From 6e49b19952f00694729736153bc97f52c0ff2582 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 16 Jan 2023 17:54:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AD=97=E5=85=B8=E6=A0=87=E7=AD=BE=20?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/DictTag/src/DictTag.vue | 21 ++++------------- yudao-ui-admin-vue3/src/store/modules/dict.ts | 23 +++++++++++++++++++ yudao-ui-admin-vue3/src/utils/dict.ts | 2 +- .../src/views/system/dict/dict.data.ts | 11 +++++---- .../src/views/system/dict/dict.type.ts | 7 +++--- 5 files changed, 39 insertions(+), 25 deletions(-) diff --git a/yudao-ui-admin-vue3/src/components/DictTag/src/DictTag.vue b/yudao-ui-admin-vue3/src/components/DictTag/src/DictTag.vue index 321107695..fb166019d 100644 --- a/yudao-ui-admin-vue3/src/components/DictTag/src/DictTag.vue +++ b/yudao-ui-admin-vue3/src/components/DictTag/src/DictTag.vue @@ -17,6 +17,9 @@ const getDictObj = (dictType: string, value: string) => { const dictOptions = getDictOptions(dictType) dictOptions.forEach((dict: DictDataType) => { if (dict.value === value) { + if (dict.colorType + '' === 'primary' || dict.colorType + '' === 'default') { + dict.colorType = '' + } dictData.value = dict } }) @@ -31,25 +34,11 @@ onUpdated(() => { })