1.0.0 • Published 4 years ago

v-shortcut v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

v-shortcut

依赖vue的快捷键设置工具

Installation

npm i v-shortcut

Usage

template
<v-shortcut v-model="value" :filter="filterFunction"></v-shortcut>
js
import VShortcut from 'v-shortcut'
export default{
  components:{
    VShortcut
  },
  data:{
    value: '17+65' // 默认输入框显示ctrl+a
  },
  methods:{
    filterFunction({compCode,show,event}) {
      compCode:组合键的值
      show:输入框显示的内容值
      event:当前keydown事件
      return true | false :快捷键可用 | 不可用
    }
  }
}