实现效果
javascript
<el-tree
node-key="id"
ref="tree"
@check-change="handleCheckChange"
:props="props"
:load="loadNode"
lazy
show-checkbox //添加选择框
>
//深度穿透
/deep/.el-tree-node {
.is-leaf + .el-checkbox .el-checkbox__inner {
display: inline-block;
}
.el-checkbox .el-checkbox__inner {
display: none;
}
}