mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
[tree]添加node-open与node-close事件,共三个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、节点对应的 Node、节点组件本身。
This commit is contained in:
@@ -146,8 +146,10 @@
|
||||
|
||||
handleExpandIconClick() {
|
||||
if (this.expanded) {
|
||||
this.tree.$emit('node-close', this.node.data, this.node, this);
|
||||
this.node.collapse();
|
||||
} else {
|
||||
this.tree.$emit('node-open', this.node.data, this.node, this);
|
||||
this.node.expand();
|
||||
this.$emit('node-expand', this.node.data, this.node, this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user