0.0.1 • Published 3 years ago

vue-shortcut-key v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vue-shortcut-key

A keyboard shortcut instruction plugin for vue| 一个用于vue的键盘快捷键指令插件

Install

$ npm i vue-shortcut-key
# or
$ yarn add vue-shortcut-key

Usage

import Vue from 'vue'
import vueShortcutKey from 'vue-shortcut-key'
Vue.use(vueShortcutKey)
<template>
  <div v-sk="handleMethod"> 
    Press `ctrl + c` to  continue.
  </div>
</template>

<script>
export default {
  data () {
    return {
      show: true
    }
  },
  methods: {
    handleMethod () {
      do something...
    }
  }
}
</script>