From cbc21c33b1861414d0422784da2d1a5a66de80d9 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 6 Mar 2023 11:48:39 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=A7=A3=E5=86=B3=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=AD=97=E5=85=B8=E6=A0=87=E7=AD=BE=E5=80=BC=E4=B8=BA?= =?UTF-8?q?=E9=9B=B6=E6=97=B6=E6=A0=87=E7=AD=BE=E4=B8=8D=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=202=E3=80=81=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=9A=84=E6=96=87=E5=AD=97=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E4=B8=BA=E7=99=BD=E8=89=B2=EF=BC=8C=E8=A7=A3=E5=86=B3=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2=E6=97=B6?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=96=87=E5=AD=97=E7=9C=8B=E4=B8=8D=E6=B8=85?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DictTag/src/DictTag.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index f70d52bf..15b5f12a 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -33,12 +33,15 @@ export default defineComponent({ if (!props.type) { return null } - if (!props.value) { + // 解决自定义字典标签值为零时标签不渲染的问题 + if (!props.value && props.value !== 0) { return null } getDictObj(props.type, props.value.toString()) + // 添加标签的文字颜色为白色,解决自定义背景颜色时标签文字看不清的问题 return (