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

pull/2507/head
张华焱 2017-01-24 16:16:43 +08:00
parent eb7498bdaa
commit 172c3a84d0
1 changed files with 1 additions and 0 deletions

View File

@ -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();