Browse Source

字典空置校验

hella_online_20240829
zhang_li 4 months ago
parent
commit
c7d29b1b62
  1. 30
      src/components/DictTag/src/DictTag.vue

30
src/components/DictTag/src/DictTag.vue

@ -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 => {

Loading…
Cancel
Save