el-select多选 但是选择了全部就不能选择其他的选项
<el-form-item label="限制平台:" prop="platform_id">
<el-select
v-model="formData.platform_id"
filterable
clearable
multiple
placeholder="请选择"
class="w-300"
@change="handlePlat"
>
<el-option label="全平台通用" value="0"></el-option>
<el-option
v-for="(item, key) in plats"
:key="key"
:label="item.name"
:value="String(item.id)"
:disabled="item.disabled"
></el-option>
</el-select>
<div class="ml20">通用表示:全部平台</div>
</el-form-item>
handlePlat() {
// console.log(this.formData.platform_id);
// console.log(this.formData.platform_id.indexOf("0"));
if (this.formData.platform_id.indexOf("0") == "-1") {
this.plats.map((res) => {
res.disabled = false;
});
} else {
this.plats.map((res) => {
res.disabled = true;
});
this.formData.platform_id = ["0"];
}
},```