<el-tree ref="roleTree"></el-tree>
subRoleTreeCheck() {
let arr = this.$refs.roleTree.getCheckedKeys().concat(this.$refs.roleTree.getHalfCheckedKeys())
return arr;
},
通过getCheckedKeys获取到已选中节点,以及通过getHalfCheckedKeys获取到半选中节点进行拼接,然后进行合并即可获得一个包含选中以及半选中的数组
this.$refs.roleTree.getCheckedKeys().concat(this.$refs.roleTree.getHalfCheckedKeys())