on enter vuejs code example
Example 1: enter key vue
<!-- only call `vm.submit()` when the `key` is `Enter` -->
<input v-on:keyup.enter="submit()">
<input @keyup.enter="submit()">
vue
Example 2: @keyup.enter vue
<input v-on:keyup.enter="submit">
<!-- Also works like this: -->
<input @keyup.enter="submit">