Element 输入框 `input` 回车事件
作者:互联网
-
为对应的
input
输入框添加@keyup.enter.native
事件<el-input placeholder="请输入内容" v-model="searchInput" @keyup.enter.native="handleKeyDown"></el-input> handleKeyDown(e){ console.log(`回车事件${e}`); }
-
普通
inpout
输入框回车事件<input type="text" onkeydown="handleKeyDown(event)"; /> handleKeyDown(e) { console.log(`回车事件${e}`); }
-
传送门:https://blog.csdn.net/lxh_worldpeace/article/details/109965659
-
传送门:https://blog.csdn.net/weixin_38323645/article/details/89242385
标签:console,Element,输入框,handleKeyDown,csdn,事件,input,回车 来源: https://www.cnblogs.com/DL-CODER/p/16520158.html