javascript - vue select field get keypress value
问题描述
I'm using vue-search-select for implementing autocomplete on select field. Now I want to get the input user enter to search from select field. I tried using keyup event but didn't work. Is there any way to get that input user enter?
<model-list-select
:list="activity_list"
v-model="business_activity"
option-value="id"
:custom-text="optiontext"
@input="onChange($event)"
@keyup="keyhandle($event)"
>
</model-list-select>
解决方案
尝试替换@keyup="keyhandle($event)"
为@keyup.enter="keyhandle($event)"
推荐阅读
- reactjs - 如何使用 react-router 确保它在 Reactjs 中工作
- android - Platform Exception (error, java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml google_maps_flutter not working
- java - 如何修改像素并使用mouseclickedaction?
- c# - RDLC 报告仅显示列表中的第一项
- python - Python Scrapy 字典项目
- python - 在 python 中拆分文件 - 更快的方式
- java - 等待 kafkaTemplate 等待未来
- dart - 在 Dart 中测试可连接流
- java - Netbeans“运行文件”不适用于 HTML 或 JSP(Java Web 应用程序)
- csv - OpenCSV 可以忽略记录上的尾随逗号吗?