npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ty-vue-keytemp

v1.0.31

Published

按键事件+按键模板

Downloads

4

Readme

vue-keytemp

功能描述:
   1.支持模板、指令、全局 三种模式
   2.模板和指令的模式针对单独路由或者组件,组件卸载之后将自动清空事件缓存(解决事件过多导致内存问题)
   3.可以在不同的路由或组件里面使用同样的按键组合来进行不同的操作
   4.按键设置可不区分大小写
   5.支持触发dom自带事件

注册使用

npm install ty-vue-keytemp -d

import keytemp from 'ty-vue-keytemp'

Vue.use(keytemp)

参数

 config:
    1.key 按键名(当前只包含数字+大小写字母+  ALT、CTRL、SHIFT)  //必填
    2.resp 按键触发响应函数   //非必填
    3.actvie dom原生事件名  //非必填
    4.el 目标dom元素  //非必填
    
    触发模式 resp 和 active (必选一项)
    
    全局和模板模式如果需要使用active触发方式 要将目标的dom元素带上。
    指令模式无需传dom默认使用指令绑定的元素dom

模板

<KeyDownTempalte :eventList="[{config},{config}]"/>

模板模式只需要引用一个组件,可配置多个按键事件

指令

"v-pressKey={config}"//单键
"v-pressKey={config}"//组合键 通过+号拼接

全局

vue.$pressKeyEvent.addEventListen({config})

版本

1.0.1
    1.修复工具位置引用错误

1.0.2
    1.解耦element-ui 提高通用性

1.0.3
    1.bug调试

1.0.20
    1.处理es6兼容

1.0.3
    1.修复按键兼容

2.0版本待优化:
    1.系统事件冲突
    2.补全所有按键