weex-nuke
Version:
基于 Rax 、Weex 的高性能组件体系 ~~
51 lines (33 loc) • 1.28 kB
Markdown
# Swipe
- category: API
- chinese: 滑动手势
- type: API
---
## Usage
Simple sliding gesture Library
## API
### Attribute
|Name|Type|Default|Description|
|:---------------|:--------|:----|:----------|
|initialVelocityThreshold|number|0.2|Minimum velocity threshold|
|verticalThreshold|number|1|Maximum threshold in vertical velocity direction|
|horizontalThreshold|number|5|Maximum threshold of horizontal velocity direction|
|horizontal|boolean|true|Whether listen to horizontal gestures|
|vertical|boolean|true|Whether listen to vertical gestures|
### Event
|Name|Parameter|Description|
|:---------------|:--------|:----------|
|onSwipeBegin|{ direction, distance, velocity }|..|
|onSwipe|{ direction, distance, velocity }|..|
|onSwipeEnd|{ direction, distance, velocity }|..|
direction is string type:
const directions = {
SWIPE_UP: 'SWIPE_UP',
SWIPE_DOWN: 'SWIPE_DOWN',
SWIPE_LEFT: 'SWIPE_LEFT',
SWIPE_RIGHT: 'SWIPE_RIGHT'
};
## The Other
- Chat with <a href="dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=kjwo3w5">@翊晨[yichen]</a> in Dingtalk desktop App <a href='https://tms.dingtalk.com/markets/dingtalk/download'>Download</a>
- DingTalk Group
<img src="https://img.alicdn.com/tfs/TB101EESpXXXXXFXpXXXXXXXXXX-1122-1362.jpg" width="260" />