element 组件的话

利用 

@keyup.enter.native="handleSearch"
绑定 搜索事件

el-input键盘事件(空格搜索)

 

非 element-UI 组件,直接 @keyup.enter 就可以。

相关文章: