Przeglądaj źródła

修复字典组件值为整形不显示问题

RuoYi 4 lat temu
rodzic
commit
40bdf7b100
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      ruoyi-ui/src/components/DictTag/index.vue

+ 3 - 3
ruoyi-ui/src/components/DictTag/index.vue

@@ -31,12 +31,12 @@ export default {
31 31
       type: Array,
32 32
       default: null,
33 33
     },
34
-    value: [String, Array],
34
+    value: [Number, String, Array],
35 35
   },
36 36
   computed: {
37 37
     values() {
38
-      if (this.value) {
39
-        return Array.isArray(this.value) ? this.value : [this.value];
38
+      if (this.value !== null && typeof this.value !== 'undefined') {
39
+        return Array.isArray(this.value) ? this.value : [String(this.value)];
40 40
       } else {
41 41
         return [];
42 42
       }