3👍
I mean, you could just handle all keyups, and check for the key code, since the passed event should be a regular javascript event like any other.
<input type="text" v-model="msg" class="form-control m-0" placeholder="Filter by tag" @keyup="onKeyup" />
…
methods: {
onKeyup(event) {
showTag = (event.which == 13 || event.keyCode == 13)
},
},
- [Vuejs]-Vue list not displaying the keys of a javascript dictionary?
- [Vuejs]-Filter v-for array to return specific IDs only -Vue.js
Source:stackexchange.com