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 // dictDataList
if (dictDataList.length == 0) { if (dictDataList.length == 0) {
return ( if(dictData.value?.label !== '' && dictData.value?.label !== undefined){
<ElTag return (<ElTag
style={dictData.value?.cssClass ? 'color: #fff' : ''} style={dictData.value?.cssClass ? 'color: #fff' : ''}
type={dictData.value?.colorType} type={dictData.value?.colorType}
color={ color={
dictData.value?.cssClass && isHexColor(dictData.value?.cssClass) dictData.value?.cssClass && isHexColor(dictData.value?.cssClass)
? dictData.value?.cssClass ? dictData.value?.cssClass
: '' : ''
} }
disableTransitions={true} disableTransitions={true}
> >
{t(`ts.${dictData.value?.label}`).replace('ts.', '')} {t(`ts.${dictData.value?.label}`).replace('ts.', '')}
</ElTag> </ElTag>
) )
}
} else { } else {
return ( return (
dictDataList.map(item => { dictDataList.map(item => {

Loading…
Cancel
Save