is when you click button and display the form remote search echo in the modal box, the value you want to echo is not the value bound in v-model, but it will automatically search for the bound value, that is, it will search for id instead of label.
invalid setQuery and invalid label set after clicking the button
<Select ref="agency" v-model="storeInfo.agencyId" :label="storeInfo.agencyName"
filterable remote clearable placeholder="" :remote-method="searchAgency" :loading="searchLoading">
<Option v-for="(item, index) in agencyList" :value="item.id" :key="item.id">{{item.agencyName}}</Option>
</Select>
//js:
getAgencyList(query = null) {
return this.$post("/bbtAgency/list", {
name: query.trim()
}).then(res => {
if (res.success) {
this.agencyList = res.data.page.list;
} else {
this.$Message.error(res.message);
}
});
},
searchAgency(query) {
if (query != "") {
this.searchLoading = true;
this.getAgencyList(query).then(() => {
this.searchLoading = false;
});
} else {
this.agencyList = [];
}
},