nuke-swipe

2.3.12 • Public • Published

Swipe

  • category: API
  • chinese: 滑动手势
  • type: API能力

何时使用

简易的滑动手势库

API

属性

名称 类型 默认值 描述
initialVelocityThreshold number 0.2 最小的速度阙值
verticalThreshold number 1 垂直速度方向的最大阙值
horizontalThreshold number 5 水平速度方向的最大阙值
horizontal boolean true 是否监听水平方向的手势
vertical boolean true 是否监听垂直方向的手势

事件

名称 参数 描述
onSwipeBegin { direction, distance, velocity } ..
onSwipe { direction, distance, velocity } ..
onSwipeEnd { direction, distance, velocity } ..

direction 为string:

const directions = { SWIPE_UP: 'SWIPE_UP', SWIPE_DOWN: 'SWIPE_DOWN', SWIPE_LEFT: 'SWIPE_LEFT', SWIPE_RIGHT: 'SWIPE_RIGHT' };

其他

  • bug、建议联系 @翊晨
  • 钉钉交流群

Readme

Keywords

Package Sidebar

Install

npm i nuke-swipe

Weekly Downloads

98

Version

2.3.12

License

none

Unpacked Size

37.8 kB

Total Files

13

Last publish

Collaborators

  • doub
  • fnatic
  • leanhunter