页面所有el-select设为只读、不可编辑

时间:2024-12-19 22:02:32

如果页面有多个el-select

<el-select v-model="" filterable placeholder="请选择"  :disabled="isSearch">
<el-option v-for="item in options" :key="" :label="" :value=""></el-option>	</el-select>

加 :disabled=“isSearch”
再改变背景色

var Inp = document.getElementsByTagName("input");
for (var i = 0; i < Inp.length; i++) {
Inp[i].style.backgroundColor = '#FFFFFF'  
}
this.isSearch = true