使用element ui时遇到的一些小问题与解决方法记录。(element ui事儿好多
1. el-input中绑定@keydown.enter=”goSearch”不起作用
解决方法:@keydown.enter.native="goSearch"
2. el-input自动获取焦点
解决方法:在el-input
标签上加入ref
属性,然后在需要的地方直接调用。
1 | <el-input |
this.$refs.input.focus()
--- 本文结束 The End ---
使用element ui时遇到的一些小问题与解决方法记录。(element ui事儿好多
解决方法:@keydown.enter.native="goSearch"
解决方法:在el-input
标签上加入ref
属性,然后在需要的地方直接调用。
1 | <el-input |
this.$refs.input.focus()