0.11.4 • Published 2 years ago
yox-touch v0.11.4
yox-touch
yox-touch
基于指令封装了 hammerjs,理论上拥有 hammerjs
所有的功能。
Install
NPM
npm install yox
npm install yox-touch
npm install hammerjs
import Yox from 'yox'
import * as YoxTouch from 'yox-touch'
Yox.use(YoxTouch)
CDN
<script src="https://unpkg.com/hammerjs@latest"></script>
<script src="https://unpkg.com/yox@latest"></script>
<script src="https://unpkg.com/yox-touch@latest"></script>
<script>
// 必须手动注册
YoxTouch.setHammer(window.Hammer)
Yox.use(YoxTouch)
</script>
Usage
<div>
<button on-tap="tap()">
Tap
</button>
<button on-double-tap="doubleTap()">
Double Tap
</button>
<button on-press="press()">
Press
</button>
<button on-long-press="longPress()">
Long Tap
</button>
<button on-swipe-left="swipeLeft()">
swipeLeft
</button>
<button on-swipe-right="swipeRight()">
swipeRight
</button>
</div>
{
methods: {
tap: function () {
},
doubleTap: function () {
}
}
}
更多内容,请参考 hammerjs 文档
0.11.4
2 years ago
0.11.0
2 years ago
0.11.1
2 years ago
0.11.2
2 years ago
0.11.3
2 years ago
0.10.2
5 years ago
0.10.1
5 years ago
0.10.0
5 years ago
0.9.0
6 years ago
0.8.1
6 years ago
0.8.0
7 years ago
0.7.0
7 years ago
0.6.0
7 years ago
0.5.0
7 years ago
0.4.0
7 years ago
0.3.1
7 years ago
0.3.0
7 years ago
0.2.2
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.11
7 years ago
0.0.10
7 years ago
0.0.9
7 years ago
0.0.8
7 years ago
0.0.7
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago