<el-form-item label="权益类型:" prop="legalRuleType" >
<el-select v-model="dataForm.legalRuleType" @change="selectModel($event)" style="width:200px" placeholder="请选择" :size="size" :disabled="disabled">
<el-option
v-for="item in ruleTypeList"
:key="item.id"
:label="item.ruleName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
selectModel(id){
let obj = {};
let selectModel = {};
obj = this.ruleTypeList.find((item)=>{//model就是上面的数据源
if(item.id === id){
this.selectModel.legalRuleType = id;
this.selectModel.ruleName = item.ruleName;
this.rulePowerForm.legalRuleType = id;
}
});
},
selectModel(id){
let obj = {};
let selectModel = {};
obj = this.ruleTypeList.find((item)=>{//model就是上面的数据源
if(item.id === id){
this.selectModel.legalRuleType = id;
this.selectModel.ruleName = item.ruleName;
this.rulePowerForm.legalRuleType = id;
}
});
},
方法二:
<el-select v-model="ruleForm.AJXL"
placeholder="请选择"
@change="selectXL($event)">
<el-option v-for="(item,index) of XLdata"
:key="index"
:label="item.XLMC"
:value="{value:item.BSM,label:item.XLMC}"></el-option>
</el-select>
selectXL(selVal) {
let { value, label } = selVal;
console.log(value,label )
},