Tree: add renderAfterExpand

This commit is contained in:
Leopoldthecoder
2017-12-24 18:59:09 +08:00
committed by 杨奕
parent bfa9f4ed0f
commit 351f900df6
4 changed files with 14 additions and 2 deletions

View File

@@ -41,7 +41,7 @@
<el-collapse-transition>
<div
class="el-tree-node__children"
v-if="childNodeRendered"
v-if="!renderAfterExpand || childNodeRendered"
v-show="expanded"
role="group"
:aria-expanded="expanded"
@@ -49,6 +49,7 @@
<el-tree-node
:render-content="renderContent"
v-for="child in node.childNodes"
:render-after-expand="renderAfterExpand"
:key="getNodeKey(child)"
:node="child"
@node-expand="handleChildNodeExpand">
@@ -77,7 +78,11 @@
}
},
props: {},
renderContent: Function
renderContent: Function,
renderAfterExpand: {
type: Boolean,
default: true
}
},
components: {