Pārlūkot izejas kodu

【功能优化】全局:DictTag 的 `default` 情况下,使用 `info` 替代,避免浏览器 warning 警告

YunaiV 11 mēneši atpakaļ
vecāks
revīzija
0704672ad3
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/components/DictTag/src/DictTag.vue

+ 2 - 2
src/components/DictTag/src/DictTag.vue

@@ -22,8 +22,8 @@ export default defineComponent({
       const dictOptions = getDictOptions(dictType)
       dictOptions.forEach((dict: DictDataType) => {
         if (dict.value === value) {
-          if (dict.colorType + '' === 'primary' || dict.colorType + '' === 'default') {
-            dict.colorType = ''
+          if (dict.colorType + '' === 'default') {
+            dict.colorType = 'info'
           }
           dictData.value = dict
         }