mirror of
https://github.com/youzan/vant.git
synced 2026-04-01 02:01:29 +08:00
[new feature] Swipe add 'initialSwipe' prop (#279)
* [bugfix] CouponList always show empty info * [bugfix] add click feedback of buttons in components * [Doc] add custom theme document * [new feature] Notice bar support more props * [bugfix] PullRefresh test cases * [bugfix] unused NoticeBar style * [bugfix] Swipe width calc error * [Doc] english document of all action components * [Doc] change document site path to /zanui/vant * [Doc] fix * [bugfix] uploader style error * [bugfix] tabs document demo * [new feature] Cell support vue-router target route * [bugfix] add cell test cases * update yarn.lock * [bugfix] Tabbar cann't display info when use icon slot * [Doc] update document title * [bugfix] Dialog should reset button text when showed * [new feature] CouponList add showCloseButton prop * [new feature] Swipe add 'initialSwipe' prop
This commit is contained in:
@@ -72,6 +72,7 @@ export default {
|
||||
| autoplay | Autoplay interval (ms) | `Number` | - | - |
|
||||
| duration | Animation duration (ms) | `Number` | `500` | - |
|
||||
| showIndicators | Whether to show indocators | `Boolean` | `true` | - |
|
||||
| initialSwipe | Index of initial swipe, start from 0 | `Number` | `0` | - |
|
||||
|
||||
### Event
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ Vue.component(SwipeItem.name, SwipeItem);
|
||||
|
||||
:::demo 图片懒加载
|
||||
```html
|
||||
<van-swipe>
|
||||
<van-swipe :autoplay="3000">
|
||||
<van-swipe-item v-for="(image, index) in images" :key="index">
|
||||
<img v-lazy="image" />
|
||||
</van-swipe-item>
|
||||
@@ -108,6 +108,7 @@ export default {
|
||||
| autoplay | 自动轮播间隔,单位为 ms | `Number` | - | - |
|
||||
| duration | 动画时长,单位为 ms | `Number` | `500` | - |
|
||||
| showIndicators | 是否显示指示器 | `Boolean` | `true` | - |
|
||||
| initialSwipe | 初始位置,从 0 开始算 | `Number` | `0` | - |
|
||||
|
||||
### 事件
|
||||
|
||||
|
||||
Reference in New Issue
Block a user