when using the element-ui tree component, the data is normally obtained from the background, and the ref property is also written, but there is no reference to this component in the method, so it is impossible to set the value checked by the tree component. There is still a lot of bug for this tree component.
<el-tree
:data="treeData"
show-checkbox
ref="tree"
node-key="_id"
:default-checked-keys="tree_checked">
</el-tree>
this.$refs.tree.setCheckedKeys(row.role)
Call this.$refs.tree, in the method to report an error undefined does not have this component, what is the matter? Confused me