Merge pull request #1698 from dataease/pr@v1.7@fix_deselectgrid

fix: 下拉列表组件逻辑错误
This commit is contained in:
fit2cloud-chenyw 2022-01-26 13:27:10 +08:00 committed by GitHub
commit 79c3334461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,14 +127,20 @@ export default {
},
'element.options.attrs.multiple': function(value, old) {
if (typeof old === 'undefined' || value === old) return
// if (!this.inDraw) {
this.value = value ? [] : null
this.element.options.value = ''
// }
if (!this.inDraw) {
this.value = value ? [] : null
this.element.options.value = ''
} else {
this.value = this.fillValueDerfault()
}
this.show = false
this.$nextTick(() => {
this.show = true
if (value) {
this.checkAll = this.value.length === this.datas.length
this.isIndeterminate = this.value.length > 0 && this.value.length < this.datas.length
}
})
}
},