Vue provide some shortcut methods:
@mousemove.stop
is comparable toe.stopPropogation()
@mousemove.prevent
this is likee.preventDefault()
@submit.prevent
this will no longer reload the page on submission@click.once
not to be confused with v-once, this click eventwill be triggered once.v-model.lazy
won’t populate the content automatically, it will wait to bind until an event happens.
You can define your own shortcut methods as well: doc
Vue.config.keyCodes = { v: 86, f1: 112, // camelCase won`t work mediaPlayPause: 179, // instead you can use kebab-case with double quotation marks "media-play-pause": 179, up: [38, 87] } <input type="text" @keyup.media-play-pause="method">