element-ui的tree组件,怎么根据数据data的checked属性为true,渲染时就能默认选中;里面有详情描述请教,怎么根据 publish_treeData数据的expanded和checked属性去设置是否默认展开和默认选中的节点啊,比如disabled: true就能禁用状态<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 }] }],
- 2 回答
- 0 关注
- 1147 浏览
添加回答
举报
0/150
提交
取消