Get the value of select from the background and assign it to select, how to trigger the change event
The abbreviation of the html code is as follows:
<select v-model="resData.type" @change="supRes(resData.type)" >
<option value="">--请选择--</option>
<option value="2">123</option>
<option value="3">456</option>
</select>
js code abbreviation is as follows:
axios({
method:"get",
url:"***",
params:{ id : row.id }
}).then((res)=>{
var data = res.data.content;
this.resData = {
type : data.type
}
})
supRes:function(val){
console.log(val)
}