作者 RuoYi

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

@@ -31,12 +31,12 @@ export default { @@ -31,12 +31,12 @@ export default {
31 type: Array, 31 type: Array,
32 default: null, 32 default: null,
33 }, 33 },
34 - value: [String, Array], 34 + value: [Number, String, Array],
35 }, 35 },
36 computed: { 36 computed: {
37 values() { 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 } else { 40 } else {
41 return []; 41 return [];
42 } 42 }