fix tree accordion bug when click on icon (#2440)

This commit is contained in:
baiyaaaaa
2017-01-16 16:34:32 +08:00
committed by cinwell.li
parent d973911b45
commit e6b89257ed
2 changed files with 8 additions and 7 deletions

View File

@@ -6,7 +6,7 @@
:props="props"
:key="getNodeKey(child)"
:render-content="renderContent"
@click.native="handleChildNodeClick(child)">
@node-expand="handleNodeExpand">
</el-tree-node>
<div class="el-tree__empty-block" v-if="!root.childNodes || root.childNodes.length === 0">
<span class="el-tree__empty-text">{{ emptyText }}</span>
@@ -141,8 +141,8 @@
setChecked(data, checked, deep) {
this.store.setChecked(data, checked, deep);
},
handleChildNodeClick(node) {
this.broadcast('ElTreeNode', 'tree-node-click', node);
handleNodeExpand(nodeData, node, instance) {
this.broadcast('ElTreeNode', 'tree-node-expand', node);
}
},