/**
* @description: 事件类型
*/
ElSelect_eventType_change_out(val) {
let vm = this;
if (val.length === 0) {
this.ElSelect_eventType.value = [null];
this.eventTypeList = null;
this.getHiddenEventData();
return;
}
// 全部和其他互斥
if (val.length > 0 && val.includes(null)) {
let arr = val.indexOf(null) == 0 ? val.slice(1) : [null];
this.ElSelect_eventType.value = arr;
this.eventTypeList = arr;
} else if (
val.length == vm.ElOption_eventType.options_in.length - 1 &&
!val.includes(null)
) {
this.ElSelect_eventType.value = [null];
this.eventTypeList = null;
} else {
this.ElSelect_eventType.value = val;
this.eventTypeList = val;
}
this.getHiddenEventData();
},
多项选择下拉选择器与“全部”的逻辑关系
最新推荐文章于 2024-11-03 14:58:21 发布
该代码段处理了ElSelect_eventType选择值的变化,当值为空时重置为[null],处理全部和其他选项的互斥情况,并根据选择更新eventTypeList,同时调用getHiddenEventData()函数。
摘要由CSDN通过智能技术生成