forked from github/dataease
Merge pull request #2332 from dataease/pr@dev@fix_tree_single_multi_switch
fix: 树过滤器单多模式切换
This commit is contained in:
commit
75c1bc62cc
@ -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)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user