feat: 适配 element 的标签颜色

pull/5/MERGE
xingyu 2023-04-24 20:16:38 +08:00
parent 2111e14e31
commit 48ff92faf7
1 changed files with 5 additions and 1 deletions

View File

@ -35,8 +35,12 @@ export default defineComponent({
}
dictOptions.forEach((dict: DictDataType) => {
if (dict.value === value) {
if (dict.colorType + '' === 'primary' || dict.colorType + '' === 'info') {
if (dict.colorType + '' === 'primary') {
dict.colorType = 'processing'
} else if (dict.colorType + '' === 'danger') {
dict.colorType = 'error'
} else if (dict.colorType + '' === 'info') {
dict.colorType = 'default'
}
dictData.value = dict
}