fix : 修改自定义对表头的影响

This commit is contained in:
zhangyu
2020-08-05 11:18:55 +08:00
parent 339b834256
commit 902ae7e8c3
2 changed files with 8 additions and 6 deletions

View File

@@ -3,11 +3,12 @@
<div class="pop-title">{{$t('overall.select')}}</div>
<div class="pop-box custom-labels">
<el-scrollbar style="height: 100%;">
<!--NotSet 为true不可设置-->
<div
v-for="(item,index) in custom"
:key="index"
class="custom-label"
:class="!allowedAll && (index==0 || index == 1) ? 'custom-label-disabled' : ''"
:class="!allowedAll && (index==0 || index == 1 || item.NotSet) ? 'custom-label-disabled' : ''"
@click="handler(item,index)"
:id="'element-set-el-'+index"
>
@@ -80,7 +81,7 @@ export default {
//全选all true 或者全取消cancel false按钮
batchHandler(state) {
for (let index = 0; index < this.custom.length; index++) {
if (index == 0 || index == 1) {
if (index == 0 || index == 1 || this.custom[index].NotSet) {
this.custom[index].show = true;
} else {
this.custom[index].show = state;
@@ -89,7 +90,7 @@ export default {
},
//单选
handler(val, index) {
if (!this.allowedAll && (index == 0 || index == 1)) {
if (!this.allowedAll && (index == 0 || index == 1 || val.NotSet)) {
this.custom[index].show = true;
} else {
this.custom[index].show = !this.custom[index].show;