我有2个输入,当用户按下回车键时,我想把焦点从第一个切换到第二个.
<input v-on:keyup.enter="$(':focus').next('input').focus()"
...>
<input ...>
但在进入控制台时,我看到错误:
build.js:11079 [Vue warn]: Property or method "$" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. (found in anonymous component - use the "name" option for better debugging messages.)warn @ build.js:11079has @ build.js:9011keyup @ build.js:15333(anonymous function) @ build.js:10111
build.js:15333 Uncaught TypeError: $ is not a function