Skip to content

yoxjs/yox-finger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 * as 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>

About

AlloyFinger wrapper for Yox.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published