v-shortcut

1.0.0 • Public • Published

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 :快捷键可用 | 不可用
    }
  }
}

Readme

Keywords

Package Sidebar

Install

npm i v-shortcut

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.13 kB

Total Files

3

Last publish

Collaborators

  • gusheng123