yox-finger

0.8.1 • Public • Published

yox-finger

基于 AlloyFinger,实现超小的手势库。

yox-finger 没有 yox-touch 强大,比如鼠标点击不会触发 tap 事件。

如果完全不考虑网页出现在 PC 场景,建议使用此库,而不是 yox-touch

Install

NPM

npm install yox
npm install yox-finger
import Yox from 'yox'
import YoxFinger from 'yox-finger'
Yox.use(YoxFinger)

CDN

<script src="https://unpkg.com/alloyfinger@latest"></script>
<script src="https://unpkg.com/yox@latest"></script>
<script src="https://unpkg.com/yox-finger@latest"></script>
<script>
  Yox.use(YoxFinger)
</script>

Usage

{
  methods: {
    tap: function () {

    },
    pinch: function () {

    },
    longTap: function () {

    }
  }
}
<div>
  <button on-tap="tap()">
    Tap
  </button>
  <button on-pinch="pinch()">
    Pinch
  </button>
  <button on-long-tap="longTap()">
    Long Tap
  </button>
</div>

Package Sidebar

Install

npm i yox-finger

Weekly Downloads

0

Version

0.8.1

License

MIT

Unpacked Size

228 kB

Total Files

10

Last publish

Collaborators

  • musicode