Browse Source

feat: 适配 element 的标签颜色

main
xingyu 2 years ago
parent
commit
48ff92faf7
  1. 6
      src/components/DictTag/src/DictTag.vue

6
src/components/DictTag/src/DictTag.vue

@ -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
}