mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Add check event and getHalfChecedNodes method for Tree (#9730)
This commit is contained in:
@@ -181,6 +181,15 @@
|
||||
|
||||
handleCheckChange(value, ev) {
|
||||
this.node.setChecked(ev.target.checked, !this.tree.checkStrictly);
|
||||
this.$nextTick(() => {
|
||||
const store = this.tree.store;
|
||||
this.tree.$emit('check', this.node.data, {
|
||||
checkedNodes: store.getCheckedNodes(),
|
||||
checkedKeys: store.getCheckedKeys(),
|
||||
halfCheckedNodes: store.getHalfCheckedNodes(),
|
||||
halfCheckedKeys: store.getHalfCheckedKeys(),
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
handleChildNodeExpand(nodeData, node, instance) {
|
||||
|
||||
Reference in New Issue
Block a user