소스 검색

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

RuoYi 3 년 전
부모
커밋
4e8c6fb7c0
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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 [];
       }