1、 在data中定义id跟name
data(){
return{
optForm:{
whId:'',
whName:'',
}
}
}
<el-form-item label="地点:" prop="whId">
<el-select v-model="optForm.whId" @change="whChange" clearable>
<el-option
v-for="item in signWareHouseList"
:key="item.whId"
:label="item.whName"
:value="item.whId"
></el-option>
</el-select>
</el-form-item>
///地点选中
whChange(val){
this.optForm.whName = this.signWareHouseList.find(item => item.whId == val).whName
},