Ver código fonte

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

张华焱 8 anos atrás
pai
commit
172c3a84d0
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      packages/tree/src/tree-node.vue

+ 1 - 0
packages/tree/src/tree-node.vue

@@ -145,6 +145,7 @@
       },
 
       handleExpandIconClick() {
+        if (this.node.isLeaf) return;
         if (this.expanded) {
           this.tree.$emit('node-collapse', this.node.data, this.node, this);
           this.node.collapse();