Events
Event handling
<input @click="onClick($event, prop)">
Whole list of events:
- click
- mousedown
- mouseup
- keyup
- change
- mouseout
- mouseover
- mouseenter
- mouseleave
- click
- scroll
- mousewheel
- submit
- focus
- blur
- dragstart
- dragend
Also you can use @ instead of ac-
ac-mod
<input ac-mod="prevent, stop, once, self, capture">
ac-key="stop"
The event's propagation will be stopped
ac-key="prevent"
The submit event will no longer reload the page
ac-key="once"
The event will be triggered once, further triggering will be ignored
ac-key="self"
The event will be triggered if event.target is the element itself
ac-key="capture"
Equals to element.addEventListener('event', function(){}, true);
ac-keymod
<input ac-mod="prevent, stop, once, self, capture">
ac-keymod="enter"
The event's will be triggered if event.keyCode = '13'
Whole list of key modifier aliases:
- esc
- tab
- enter
- space
- up
- left
- right
- down
- delete