NEZ-2048 fix: dashboard variable 下拉框 选中行为 优化
This commit is contained in:
@@ -368,16 +368,19 @@ export default {
|
||||
})
|
||||
item.checked = item.checkAll ? allValue : []
|
||||
item.isIndeterminate = false
|
||||
this.$store.dispatch('dispatchVariablesArr', [...this.labelArr])
|
||||
if (!item.multi) {
|
||||
this.close()
|
||||
this.$store.dispatch('dispatchVariablesArr', [...this.labelArr])
|
||||
}
|
||||
},
|
||||
checkedChange (item, value) {
|
||||
const checkedCount = value.length
|
||||
item.checkAll = checkedCount === this.labelValue[item.name].length
|
||||
item.isIndeterminate = checkedCount > 0 && checkedCount < this.labelValue[item.name].length
|
||||
this.$store.dispatch('dispatchVariablesArr', [...this.labelArr])
|
||||
},
|
||||
selectLabelValue (item, value) {
|
||||
item.checked = [value.value]
|
||||
this.close()
|
||||
this.$store.dispatch('dispatchVariablesArr', [...this.labelArr])
|
||||
},
|
||||
triggerVisible (item) {
|
||||
@@ -387,6 +390,9 @@ export default {
|
||||
},
|
||||
close () {
|
||||
this.labelArr.forEach((item) => {
|
||||
if (item.visible && item.multi) {
|
||||
this.$store.dispatch('dispatchVariablesArr', [...this.labelArr])
|
||||
}
|
||||
item.visible = false
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user