Prechádzať zdrojové kódy

fix 修复字典el-tag警告

LiuHao 2 rokov pred
rodič
commit
30f271359a

+ 9 - 1
src/components/DictTag/index.vue

@@ -15,7 +15,15 @@
           :key="item.value + ''"
           :disable-transitions="true"
           :index="index"
-          :type="item.elTagType === 'primary' || item.elTagType === 'default' ? 'primary' : item.elTagType"
+          :type="
+            item.elTagType === 'primary' ||
+            item.elTagType === 'success' ||
+            item.elTagType === 'info' ||
+            item.elTagType === 'warning' ||
+            item.elTagType === 'danger'
+              ? item.elTagType
+              : 'primary'
+          "
           :class="item.elTagClass"
         >
           {{ item.label + ' ' }}

+ 1 - 1
src/views/system/dict/data.vue

@@ -55,7 +55,7 @@
             >
             <el-tag
               v-else
-              :type="scope.row.listClass === 'primary' || scope.row.listClass === 'default' ? '' : scope.row.listClass"
+              :type="scope.row.listClass === 'primary' || scope.row.listClass === 'default' ? 'primary' : scope.row.listClass"
               :class="scope.row.cssClass"
               >{{ scope.row.dictLabel }}</el-tag
             >