实现冻结解冻功能
核心:给多选框绑定 disabled 属性,属性为数组,当在数组中找到则为冻结。
<div class="fieldContainer">
<div class="left">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
>全选</el-checkbox
>
<el-checkbox-group
v-model="checkedTexts"
@change="handleCheckedTextsChange"
>
<el-checkbox
v-for="item in texts"
:label="item"
:key="item"
:disabled="
disableArray.length > 0 && disableArray.indexOf(item) != -1
"
>{{ item }}</el-checkbox
>
</el-checkbox-group>
</div>