Commit 895d4c09b9aa6aaa808f8e88296b8a6480a7ab2f
Committed by
GitHub
Merge pull request #4850 from qq240814476/malintreenode
tree on-select-change/on-check-change add node
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/components/tree/tree.vue
| ... | ... | @@ -163,7 +163,7 @@ |
| 163 | 163 | } |
| 164 | 164 | this.$set(node, 'selected', !node.selected); |
| 165 | 165 | |
| 166 | - this.$emit('on-select-change', this.getSelectedNodes()); | |
| 166 | + this.$emit('on-select-change', this.getSelectedNodes(), node); | |
| 167 | 167 | }, |
| 168 | 168 | handleCheck({ checked, nodeKey }) { |
| 169 | 169 | const node = this.flatState[nodeKey].node; |
| ... | ... | @@ -173,7 +173,7 @@ |
| 173 | 173 | this.updateTreeUp(nodeKey); // propagate up |
| 174 | 174 | this.updateTreeDown(node, {checked, indeterminate: false}); // reset `indeterminate` when going down |
| 175 | 175 | |
| 176 | - this.$emit('on-check-change', this.getCheckedNodes()); | |
| 176 | + this.$emit('on-check-change', this.getCheckedNodes(), node); | |
| 177 | 177 | } |
| 178 | 178 | }, |
| 179 | 179 | created(){ | ... | ... |