Ver código fonte

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

RuoYi 3 anos atrás
pai
commit
4e8c6fb7c0
1 arquivos alterados com 3 adições e 3 exclusões
  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 {
       type: Array,
       default: null,
     },
-    value: [String, Array],
+    value: [Number, String, Array],
   },
   computed: {
     values() {
-      if (this.value) {
-        return Array.isArray(this.value) ? this.value : [this.value];
+      if (this.value !== null && typeof this.value !== 'undefined') {
+        return Array.isArray(this.value) ? this.value : [String(this.value)];
       } else {
         return [];
       }