html: <el-select class="width-percent-100" v-model="form.customerId" filterable remote :remote-method="remoteMethod" :loading="Loading" placeholder="请输入后匹配"> <el-option v-for="item in list" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select>js:
remoteMethod(query) { this.Loading= true this.$api.contract.clientList({ pageNum: 1, pageSize: 10, fuzzyName: query }).then(res => { this.list= res this.Loading= false }).catch(() => { this.Loading= false }) }
elementui 中el-select输入进行远程搜索
于 2023-08-08 09:14:13 首次发布