Vue JS Modifying events

v-on:click.native trigger a native DOM event instead of a Vue event
v-on:click.stopstop the click event propagation
v-on:click.passive makes use of the passive option of addEventListener
v-on:click.capture use event capturing instead of event bubbling
v-on:click.self make sure the click event was not bubbled from a child event, but directly happened on that element
v-on:click.once the event will only be triggered exactly once
v-on:submit.preventcall event.preventDefault() on the triggered submit event, used to avoid a form submit to reload the page

Leave a Reply

Your email address will not be published. Required fields are marked *