|
|
@ -45,20 +45,22 @@ export default defineComponent({ |
|
|
|
// 添加标签的文字颜色为白色,解决自定义背景颜色时标签文字看不清的问题 |
|
|
|
// 根据 dictDataList 进行区分 是否多个 |
|
|
|
if (dictDataList.length == 0) { |
|
|
|
return ( |
|
|
|
<ElTag |
|
|
|
style={dictData.value?.cssClass ? 'color: #fff' : ''} |
|
|
|
type={dictData.value?.colorType} |
|
|
|
color={ |
|
|
|
dictData.value?.cssClass && isHexColor(dictData.value?.cssClass) |
|
|
|
? dictData.value?.cssClass |
|
|
|
: '' |
|
|
|
} |
|
|
|
disableTransitions={true} |
|
|
|
> |
|
|
|
{t(`ts.${dictData.value?.label}`).replace('ts.', '')} |
|
|
|
</ElTag> |
|
|
|
) |
|
|
|
if(dictData.value?.label !== '' && dictData.value?.label !== undefined){ |
|
|
|
return (<ElTag |
|
|
|
style={dictData.value?.cssClass ? 'color: #fff' : ''} |
|
|
|
type={dictData.value?.colorType} |
|
|
|
color={ |
|
|
|
dictData.value?.cssClass && isHexColor(dictData.value?.cssClass) |
|
|
|
? dictData.value?.cssClass |
|
|
|
: '' |
|
|
|
} |
|
|
|
disableTransitions={true} |
|
|
|
> |
|
|
|
{t(`ts.${dictData.value?.label}`).replace('ts.', '')} |
|
|
|
</ElTag> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
return ( |
|
|
|
dictDataList.map(item => { |
|
|
|