mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-10-31 10:18:43 +08:00 
			
		
		
		
	1、解决自定义字典标签值为零时标签不渲染的问题
2、添加标签的文字颜色为白色,解决自定义背景颜色时标签文字看不清的问题
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 puhui999
					puhui999