[Vue] Setup custom keyCode
Vue Custom setup
2023-09-14 08:59:17 时间
Vue provide some shortcut methods:
@mousemove.stop
is comparable toe.stopPropogation()
@mousemove.prevent
this is likee.preventDefault()
@submit.prevent
this will no longer reload the page on submission@click.once
not to be confused with v-once, this click eventwill be triggered once.v-model.lazy
won’t populate the content automatically, it will wait to bind until an event happens.
You can define your own shortcut methods as well: doc
Vue.config.keyCodes = { v: 86, f1: 112, // camelCase won`t work mediaPlayPause: 179, // instead you can use kebab-case with double quotation marks "media-play-pause": 179, up: [38, 87] } <input type="text" @keyup.media-play-pause="method">
相关文章
- Vue -> 解决 vue-ueditor-wrap 不能显示的问题
- vue+element实现展开行
- [Vue @Component] Define Props on a Vue Class with vue-property-decorator
- [Vue @Component] Simplify Vue Components with vue-class-component
- 基于vue-cli项目添加服务端渲染
- [Vue @Component] Simplify Vue Components with vue-class-component
- [Vue] Get up and running with vue-router
- vue.js项目在nginx上部署:使spring后端记录真实ip地址
- Vue Nuxtjs Cannot set property 'render' of undefined解决方法
- 【视频】vue指令之v-else-if
- 【视频】vue表单提交
- [FE] G2Plot 在 Vue 中使用 CDN 方式避免构建时增大 js 体积
- 一个典型的Vue应用的App.vue
- SAP Fiori + Vue = ?
- Vue Error-报错信息:Syntax Error: Assigning to rvalue.
- vue-tour快速入门:VUE项目中如何使用vue-tour新手引导指引插件?怎样使用?包含具体实例
- vue 的 render 函数的用法:new Vue({ render: h => h(App), }).$mount(‘#app‘)
- Vue中拆分视图层代码的5点建议
- Vue Router路由变化router-view视图不刷新
- 计算机毕设 SSM Vue的停车位租赁管理系统(含源码+论文)
- vue中使用分页组件、将从数据库中查询出来的数据分页展示(前后端分离SpringBoot+Vue)
- vue3 报错解决:找不到模块‘xxx.vue’或其相应的类型声明。(Vue 3 can not find module)
- 前端MVC Vue2学习总结(二)——Vue的实例、生命周期与Vue脚手架(vue-cli)
- Vue(五)计算属性、过滤器、axios、vue 生命周期
- Vue(一)vue 概述与用法、MVVM、绑定语法、vue 指令
- 【异常】Jenkins执行前端项目Npm构建时,出现报错This dependency was not found: vue-class-component in ./node_modules/vu