mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Swipe): improve document (#8644)
This commit is contained in:
parent
c2b2e799e4
commit
40171e4d74
@ -193,10 +193,10 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Swipe
|
||||
| --- | --- | --- | --- |
|
||||
| prev | Swipe to prev item | - | - |
|
||||
| next | Swipe to next item | - | - |
|
||||
| swipeTo | Swipe to target index | index: target index, options: Options | - |
|
||||
| swipeTo | Swipe to target index | _index: number, options: SwipeToOptions_ | - |
|
||||
| resize | Resize Swipe when container element resized or visibility changed | - | - |
|
||||
|
||||
### swipeTo Options
|
||||
### SwipeToOptions
|
||||
|
||||
| Name | Description | Type |
|
||||
| --------- | ------------------------- | --------- |
|
||||
|
@ -68,6 +68,8 @@ export default {
|
||||
|
||||
### 监听 change 事件
|
||||
|
||||
在每一页轮播结束后,会触发 `change` 事件。
|
||||
|
||||
```html
|
||||
<van-swipe @change="onChange">
|
||||
<van-swipe-item>1</van-swipe-item>
|
||||
@ -199,10 +201,10 @@ export default {
|
||||
| --- | --- | --- | --- |
|
||||
| prev | 切换到上一轮播 | - | - |
|
||||
| next | 切换到下一轮播 | - | - |
|
||||
| swipeTo | 切换到指定位置 | index: number, options: Options | - |
|
||||
| swipeTo | 切换到指定位置 | _index: number, options: SwipeToOptions_ | - |
|
||||
| resize | 外层元素大小或组件显示状态变化时,可以调用此方法来触发重绘 | - | - |
|
||||
|
||||
### swipeTo Options 格式
|
||||
### SwipeToOptions 格式
|
||||
|
||||
| 名称 | 说明 | 类型 |
|
||||
| --------- | ------------ | --------- |
|
||||
|
Loading…
x
Reference in New Issue
Block a user