1. The questions are as follows
When the background returns the menu ID containing the half-selected state; The element document’s this.$refs.tree.setCheckedKeys(res.data.checkedKeys) method does not resolve the issue
2. The solution is as follows (use setChecked)
The key code
res.data.checkedKeys.forEach(val= > {
this.$nextTick(() = > {
this.$refs.tree.setChecked(val, true.false)})})// res.data.checkedKeys: returns the selected id array in the background
Copy the code
Related articles
Encapsulate the underlying component document again based on ElementUi or Antd