in-idol
example:
{
.number //自动清除无法转换为数字得类容
.trim //首尾无法输入空格
}
v-on(@)
例:
<input @click.stop=“turnTo” type=“number”>
{
.stop //阻止事件冒泡,注:使用router.push时,事件可能会继续执行若干步。
.prevent //阻止默认事件
.self //子组件相同事件不触发,如点击子组件,不触发父组件点击事件
.capture //先执行父组件得同名事件
.once //按钮只有第一次点击时触发事件
}
@keyup
Example: <el-button @keyup.enter="submit">Submit
@keyup, keydown, keypress{ .enter //The enter key is raised, pressed, and long pressed to trigger.
.tab
.delete (捕获“删除”和“退格”键)
.esc
.space
.up
.down
.left
.right
.ctrl
.alt
.shift
.meta
例如:@keyup..ctrl.67 //ctrl+C触发
}
Attachment: https://blog.csdn.net/weixin_35127779/article/details/81225018 Keyboard code correspondence table, key value table
Source: Technology blog of company boss