直接上代码~
<el-tree
:data="item.pgxzdata"
show-checkbox
ref="tree"
highlight-current
node-key="id"
v-model="multipleSelection"
:props="defaultProps"
@check="(click, checked)=>{handleCheckChange(click, checked,index)}"
></el-tree>
// 获取选择的节点数组
handleCheckChange(click, checked,index){
console.log(checked)
console.log(checked.checkedKeys,index);//获取全选数组
},