How vue response is achieved keyboard Enter event

ue to allow for the v-on Add button keyboard modifiers when listening event:

<! - keyCode is invoked only 13 vm.submit () -> <INPUT V-ON: keyUp .13 = "Submit" >
 

Remember all the keyCode more difficult, so Vue provides aliases for the most commonly used keys:

<!-- 同上 -->
<input v-on:keyup.enter="submit"> <!-- 缩写语法 --> <input @keyup.enter="submit">

Guess you like

Origin www.cnblogs.com/wuguangwei/p/11262750.html