:data="data"
:expand-on-click-node="false"
:icon-class="trereIcon ? 'el-icon-plus':'el-icon-close'"
:props="defaultProps"
node-key="id"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span class="custom-right">
<span class="custom-zmy">
<!-- -->
<el-checkbox
@change="handleCheck(data,$event,'add')"
v-model="data.check"
>{{data.porst ==0 ?'默认全选':data.children ?'默认全选':'默认功能'}}</el-checkbox>
<el-checkbox
@change="handleCheck(data,$event,'add1')"
v-model="data.jumpt"
>权限全选</el-checkbox>
</span>
<div
class="quanxian"
v-if="data.porst == 0?false:data.children ? false:true"
>
<span>权限:</span>
<div class="quanxian-btn">
<el-checkbox-group v-model="checkList">
<el-checkbox label="查看"></el-checkbox>
<el-checkbox label="添加"></el-checkbox>
<el-checkbox label="修改"></el-checkbox>
<el-checkbox label="删除"></el-checkbox>
</el-checkbox-group>
</div>
</div>
</span>
</span>
</el-tree>
v-model绑定同一个变量值?
elementUI组件库?
组件库多选框中的indeterminate 状态你可以试试
table表格中也有相对应的属性用于全选框
递归组件用递归思想,每个组件都有一个parent,每个parent都能追溯到源头,那反过来想,从源头开始能不能找到所有children呢