chenjianou / blog

我的个人博客
0 stars 0 forks source link

IOS手机兼容抬起键盘 #33

Open chenjianou opened 2 years ago

chenjianou commented 2 years ago
       <Input autofocus hidden class="absolute left-9999 top-9999"/>
      <form action="javascript:void 0" @keydown.enter="searchKeyUp()" >
        <AutoComplete  ref="input" class="auto-complete" transfer @on-select="onSelect" @on-change="fetchPds" clearable 
                  filterable v-model.trim="queryStr" placeholder="搜索商品名称/SKU ID" style="width: 148px">
          <Option v-for="item in pds" :key="item.pdId" :value="item.pdName">{{ item.pdName }}</Option>
        </AutoComplete>
      </form>

1、通过使用两个input框就能实现,先让第一个input先命中,然后异步的方式foucs另一个input框就能抬起