<el-tree
:data="data2"
ref="tree"
node-key="funcId"
show-checkbox
default-expand-all
@check="getCheckKey"
:props="defaultProps">
</el-tree>
getRoleFunc(request).then(res => {
if (res.code === 0) {
this.checkedNode = res.data;
//
this.$refs.tree.setCheckedKeys(this.checkedKey);
}
})
< hr >
this.checkedKey
setCheckedKeys (keys, leafOnly) I tried to set leafOnly to true and it didn"t work.