1.0.3 • Published 4 years ago

vue-hotkey-manager v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

vue-hotkey-manager

> Set and delete hotkeys in Vue project

Install

npm install vue-hotkey-manager

Usage

import Vue from 'vue'
import hotkey from 'vue-hotkey-manager'
Vue.use(hotkey)

###example

<template>
	<el-input ref='input_1'></el-input>
</template>
  • setHotkey
this.$setHotkey(this.$refs['input_1'],'ctrl+m',
function(){
	//TODO
})

The first parameter requirement for the method is Vnode, If you set in a DOM element, the hotkey is bound to the upper Vnode

  • delHotkey
this.$delHotkey(this.$refs['input_1'],'ctrl+m')
1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago