element-ui的tree組件,怎么根據(jù)數(shù)據(jù)data的checked屬性為true,渲染時就能默認選中;里面有詳情描述請教,怎么根據(jù) publish_treeData數(shù)據(jù)的expanded和checked屬性去設(shè)置是否默認展開和默認選中的節(jié)點啊,比如disabled: true就能禁用狀態(tài)<el-tree :data="publish_treeData"
show-checkbox
node-key="id"
:default-expanded-keys="defaultExpandedKeys"
:default-checked-keys="defaultCheckedKeys"
@setChecked="setCheckedFunc">
</el-tree> publish_treeData: [{ id: 1, label: '一級 2', children: [{ id: 3, label: '二級 2-1', children: [{ id: 4, label: '三級 3-1-1' }, { id: 5, label: '三級 3-1-2', expanded: true, checked: true, disabled: true }] }],
element-ui的tree組件
桃花長相依
2018-07-07 19:30:06