获取半选中节点和选中节点的keys数组
this.$refs.tree.getCheckedKeys().concat(this.$refs.tree.getHalfCheckedKeys())
![](https://img.haomeiwen.com/i14707169/15625c3558616fc2.png)
![](https://img.haomeiwen.com/i14707169/fedef3add6821871.png)
若想获取半选中节点和选中节点的数据数组,使用getCheckedNodes设置对应参数即可
this.$refs.tree.getCheckedNodes(false,true)
![](https://img.haomeiwen.com/i14707169/8243168062ef5c86.png)
演示地址:https://codepen.io/abu3389/pen/BaKvJoe?editors=1111
![](https://img.haomeiwen.com/i14707169/b698fcd484210884.gif)
网友评论