el-select 根據value查詢其對應的label值
阿新 • • 發佈:2018-09-28
tle -s -a lac find urn sub ring clas
<el-form-item label="庫位" prop="goodsLocationId" >
<el-col :span="15">
<el-select v-model="scope.row.goodsLocationId" placeholder="貨位地址" @change="changeLocationValue">
<el-option v-for="lo in locations" :label="lo.locationName" :value="lo.id" :key="lo.id"></el-option>
</el-select>
</el-col>
</el-form-item>
changeLocationValue(val){
let obj = {};
obj = this.locations.find((item)=>{
return item.id === val;
});
this.goodsLocationId.goodsLocationName = obj.locationName;
},
el-select 根據value查詢其對應的label值