1、解决自定义字典标签值为零时标签不渲染的问题

2、添加标签的文字颜色为白色,解决自定义背景颜色时标签文字看不清的问题
main
puhui999 3 years ago
parent 84e802fe93
commit cbc21c33b1

@ -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 (
<ElTag
style={dictData.value?.cssClass ? 'color: #fff' : ''}
type={dictData.value?.colorType}
color={
dictData.value?.cssClass && isHexColor(dictData.value?.cssClass)

Loading…
Cancel
Save