Hang on Vue using Element-UI's <el-autocomplete> of

Tags: <el-autocomplete>

Question 1: @ keydown.enter not trigger event

解决:@keydown.native.enter

The reason: After the element-ui package itself with a layer of input tag, hide the original event, plus .native can listen to the component root element of native events

Transfer: https://blog.csdn.net/weixin_30609287/article/details/97191681

 

Question 2: @change not trigger event

Resolution: The problem with 1 plus .native

process:

I found a few other events input instructions are used, the only change in the input box with instructions, noticed these two are not the same.

Results: I still do not know the change event I was using the wrong or how, I want to do a Baidu Post Bar of the effect that the input box, but it only becomes effective during the manual input value of this change.native, select the drop-down box options that appear, this change.native or useless. If anyone knows how to use change, hope can reply to teach me, thank you.

 

Guess you like

Origin www.cnblogs.com/woyujiezhen/p/12499581.html