Tutorial by Examples

Vue provides event modifiers for v-on by calling directive postfixes denoted by a dot. .stop .prevent .capture .self .once For examples: <!-- the click event's propagation will be stopped --> <a v-on:click.stop="doThis"></a> <!-- the submit event will no...
When listening for keyboard events, we often need to check for common key codes. Remembering all the keyCodes is a hassle, so Vue provides aliases for the most commonly used keys: .enter .tab .delete (captures both “Delete” and “Backspace” keys) .esc .space .up .down .left .right For ...
.trim If you want user input to be trimmed automatically, you can add the trim modifier to your v-model managed inputs: <input v-model.trim="msg"> .number If you want user input to be automatically typecast as a number, you can do as follow: <input v-model.number=&q...

Page 1 of 1