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

This commit is contained in:
RuoYi 2021-08-29 15:57:01 +08:00
parent 134835c870
commit 4e8c6fb7c0
1 changed files with 3 additions and 3 deletions

View File

@ -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 [];
}