[Improvement] Swipe: add swipeTo method (#1222)

This commit is contained in:
neverland
2018-06-05 09:39:02 +08:00
committed by GitHub
parent a3579a88e4
commit b33c8ef5f2
8 changed files with 223 additions and 34 deletions
+8
View File
@@ -94,3 +94,11 @@ export default {
| Event | Description | Arguments |
|-----------|-----------|-----------|
| change | Triggered when current swipe change | index: index of current swipe |
### Methods
Use ref to get swipe instance and call instance methods
| Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------|
| swipeTo | index: 目标位置的索引 | void | 滚动到目标位置 |