Commit 172c3a84 authored by 张华焱's avatar 张华焱

[tree]:add node-expand and node-collapse event

parent eb7498bd
...@@ -145,6 +145,7 @@ ...@@ -145,6 +145,7 @@
}, },
handleExpandIconClick() { handleExpandIconClick() {
if (this.node.isLeaf) return;
if (this.expanded) { if (this.expanded) {
this.tree.$emit('node-collapse', this.node.data, this.node, this); this.tree.$emit('node-collapse', this.node.data, this.node, this);
this.node.collapse(); this.node.collapse();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment