fix: 树过滤器单多模式切换

This commit is contained in:
fit2cloud-chenyw 2022-05-27 12:34:45 +08:00
parent 39b1076a08
commit adbd045bb7

View File

@ -140,8 +140,24 @@ export default {
}
this.show = false
this.$nextTick(() => {
// this.value = value ? [] : null
this.show = true
this.$nextTick(() => {
const defaultV = this.element.options.value === null ? '' : this.element.options.value.toString()
if (value) {
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') {
this.value = []
} else {
this.value = defaultV.split(',')
}
} else {
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') {
this.value = ''
} else {
this.value = defaultV.split(',')[0]
}
}
this.$refs.deSelectTree && this.$refs.deSelectTree.treeDataUpdateFun(this.datas)
})
})