vue event modifier

Prevent click events from bubbling 
<a v-on:click.stop="doThis"></a>
Submit events no longer reload the page
<form v-on:submit.prevent="onSubmit"></form>
decoration modifiers can be concatenated
<a v-on:click.stop.prevent="doThat"></a>
Only modifiers
<form v-on:submit.prevent></form>
use time capture mode when adding event listeners
<div v-on:click.capture="doThis">...</div>
The callback fires only when the event fires on the element itself (not the child elements)
<div v-on:click.self="doThat ">...</div>
All key aliases: 

.enter
.tab
.delete (captures "delete" and "backspace" keys)
.esc
.space
.up
.down
.left
.right

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324982677&siteId=291194637