修改禅道已知bug

This commit is contained in:
sunFlower
2022-10-09 09:49:31 +08:00
parent b830196641
commit d5d39e4073
4 changed files with 329 additions and 293 deletions
@@ -41,9 +41,8 @@ export default {
return getNodeKey(this.tree.nodeKey, node.data);
},
handleSelectChange(checked, indeterminate) {
handleSelectChange(checked, indeterminate,source) {
const node = this.node || this.source;
if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
this.tree.$emit('check-change', node.data, checked, indeterminate);
}
@@ -95,7 +94,6 @@ export default {
handleCheckChange(_, ev) {
const node = this.node || this.source;
node.setChecked(ev.target.checked, !this.tree.checkStrictly);
this.$nextTick(() => {
const store = this.tree.store;
@@ -103,8 +101,9 @@ export default {
checkedNodes: store.getCheckedNodes(),
checkedKeys: store.getCheckedKeys(),
halfCheckedNodes: store.getHalfCheckedNodes(),
halfCheckedKeys: store.getHalfCheckedKeys()
});
halfCheckedKeys: store.getHalfCheckedKeys(),
getCurrentNode:store.getCurrentNode()
},this.source.checked);
});
},
@@ -57,7 +57,6 @@ export default class TreeStore {
if (node.visible && !node.isLeaf && !lazy) node.expand();
};
traverse(this);
}
@@ -115,11 +115,11 @@
},
watch: {
'source.indeterminate'(val) {
this.handleSelectChange(this.source.checked, val);
this.handleSelectChange(this.source.checked, val,this.source);
},
'source.checked'(val) {
this.handleSelectChange(val, this.source.indeterminate);
this.handleSelectChange(val, this.source.indeterminate,this.source);
},
'source.expanded'(val) {