v-on
up:: Vue Directives
Any event you can listen for, you can listen for with v-on
Or, you can call Vue Methods:
Shorthand:
From the browser, you always get an event object by default. You can leverage that to get input forms for example:
If you want to pass in another props, you can use the reserved $event
variable from Vue:
Event modifiers
Sometimes you want to prevent the browser default. For example, on a submit button the page would reload but that is often not what you want.
You could also listen for a specific keyup event. In this instance, whenever enter is pressed, save the input
event.target.dataset.sortorder