1.实现动态搜索
使用el-selecet 的远程搜索,需要将filterable
和remote
设置为true
,同时传入一个remote-method
具体使用直接看https://element.eleme.cn/#/zh-CN/component/select
<el-select
:disabled="enabled"
@change="changePH"
v-model="goodsId"
:multiple="false"
ref="sizeSelect"
filterable
remote
reserve-keyword
:popper-append-to-body="false"
placeholder="请选择配货货号"
:remote-method="remoteMethod"
@keyup.enter.native="selectKeyEnter"
>
<el-option
v-for="item in list"
:style="{ color: item.checked === true ? '#3C5BF2' : '' }"
:key="item.index