Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element ui autocomplete enter 以後關閉 選項提示框 #11

Open
larrykkk opened this issue Jun 20, 2019 · 0 comments
Open

Element ui autocomplete enter 以後關閉 選項提示框 #11

larrykkk opened this issue Jun 20, 2019 · 0 comments
Labels
Element UI Element UI 相關 Vue Vue.js 相關

Comments

@larrykkk
Copy link
Owner

先給 <el-autotcomplete> 一個 ref="autocomplete"

然後在

@keyup.enter.native.prevent="inputSearch(keyword)"

裡面寫

this.$refs.autocomplete.$refs.suggestions.showPopper = false;

這樣按下 enter 之後就會一起將提示框關閉了

@larrykkk larrykkk added Element UI Element UI 相關 Vue Vue.js 相關 labels Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Element UI Element UI 相關 Vue Vue.js 相關
Projects
None yet
Development

No branches or pull requests

1 participant