Add new props 'childrenKey' to Tree component

This commit is contained in:
vanppo 2018-03-26 20:09:18 +08:00
parent a0f489478b
commit 56c7cc0efc
2 changed files with 20 additions and 7 deletions

View file

@ -6,7 +6,8 @@
:data="item"
visible
:multiple="multiple"
:show-checkbox="showCheckbox">
:show-checkbox="showCheckbox"
:children-key="childrenKey">
</Tree-node>
<div :class="[prefixCls + '-empty']" v-if="!stateTree.length">{{ localeEmptyText }}</div>
</div>
@ -40,6 +41,10 @@
emptyText: {
type: String
},
childrenKey: {
type: String,
default: 'children'
},
loadData: {
type: Function
},