element的树状控件在vue中如何自定义并默认展开?
<el-tree:data="data2"show-checkboxdefault-expand-allnode-key="id"ref="tree"highlight-currentcheck-on-click-node...
·
<el-tree
:data="data2"
show-checkbox
default-expand-all
node-key="id"
ref="tree"
highlight-current
check-on-click-node
:props="defaultProps">
</el-tree>
data2: [{
label: '全选',
children: [
{
label: "_id",
disabled: true
}
, {
label: 'name'
}, {
label: 'sex'
}, {
label: 'address'
}, {
label: "mobile"
}, {
label: "year"
}, {
label: "nation"
}, {
label: "major"
}, {
label: "username"
}, {
label: "headPicture"
}
]
}],
defaultProps: {
children: this.children,
label: 'label'
},
更多推荐
已为社区贡献3条内容
所有评论(0)