网上查了半天,一大堆都说要改源码的,最后发现有方法不用改源码的

获取方法如下

this.$refs.tree.getCheckedKeys().concat(this.$refs.tree.getHalfCheckedKeys())

将getCheckedKeys()和getHalfCheckedKeys()两个方法获取的数据合并就是我们想要的数据了

 

elementUI tree组件获取当前选择所有选中(check)和半选中(indeterminate)的节点

 

相关文章:

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