例子
element-ui el-tree数据回显问题
1:问题原因:我们可能使用

this.$refs.tree.setCheckedKeys(this.defalutArr);
或者使用
:default-expanded-keys=“treeDataSelect” :default-checked-keys=“treeDataSelect”
来进行回显的

获取数据
element-ui el-tree数据回显问题
element-ui el-tree数据回显问题
解决:
if (res.data.code == 200) {
//默认选中的树的数据
let that = this
setTimeout(function() {
res.data.data.forEach(value => {
that.$refs.rootTree.setChecked(value, true, false);
});
}, 500);
}

相关文章:

  • 2022-12-23
  • 2023-03-15
  • 2021-07-06
  • 2021-10-01
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-11
  • 2022-12-23
  • 2021-10-25
相关资源
相似解决方案