tree on-select-change/on-check-change add node
This commit is contained in:
parent
d411992d07
commit
700a3707b6
1 changed files with 2 additions and 2 deletions
|
@ -159,7 +159,7 @@
|
||||||
}
|
}
|
||||||
this.$set(node, 'selected', !node.selected);
|
this.$set(node, 'selected', !node.selected);
|
||||||
|
|
||||||
this.$emit('on-select-change', this.getSelectedNodes());
|
this.$emit('on-select-change', this.getSelectedNodes(), node);
|
||||||
},
|
},
|
||||||
handleCheck({ checked, nodeKey }) {
|
handleCheck({ checked, nodeKey }) {
|
||||||
const node = this.flatState[nodeKey].node;
|
const node = this.flatState[nodeKey].node;
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
this.updateTreeUp(nodeKey); // propagate up
|
this.updateTreeUp(nodeKey); // propagate up
|
||||||
this.updateTreeDown(node, {checked, indeterminate: false}); // reset `indeterminate` when going down
|
this.updateTreeDown(node, {checked, indeterminate: false}); // reset `indeterminate` when going down
|
||||||
|
|
||||||
this.$emit('on-check-change', this.getCheckedNodes());
|
this.$emit('on-check-change', this.getCheckedNodes(), node);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
|
|
Loading…
Add table
Reference in a new issue