名称 |
类型 |
默认值 |
必填 |
描述 |
|---|---|---|---|---|
index |
number |
0 |
否 |
当前在容器中显示的子组件的索引值。 |
autoplay |
boolean |
false |
否 |
子组件是否自动播放,自动播放状态下,导航点不可操作5+。 |
interval |
number |
3000 |
否 |
使用自动播放时播放的时间间隔,单位为ms。 |
indicator |
boolean |
true |
否 |
是否启用导航点指示器,默认true。 |
digital5+ |
boolean |
false |
否 |
是否启用数字导航点,默认为false。 说明:
必须设置indicator时才能生效数字导航点。 |
indicatordisabled5+ |
boolean |
false |
否 |
指示器是否禁止用户手势操作,设置为true时,指示器不会响应用户的点击拖拽。 |
loop |
boolean |
true |
否 |
是否开启循环滑动。 |
duration |
number |
- |
否 |
子组件切换的动画时长。 |
vertical |
boolean |
false |
否 |
是否为纵向滑动,纵向滑动时采用纵向的指示器。 |
cachedsize7+ |
number |
-1 |
否 |
swiper延迟加载时item最少缓存数量。-1表示全部缓存。 |
scrolleffect7+ |
string |
spring |
否 |
滑动效果。目前支持如下:
|
名称 |
类型 |
默认值 |
必填 |
描述 |
|---|---|---|---|---|
indicator-color |
<color> |
- |
否 |
导航点指示器的填充颜色。 |
indicator-selected-color |
<color> |
#ff007dff |
否 |
导航点指示器选中的颜色。 |
indicator-size |
<length> |
4px |
否 |
导航点指示器的直径大小。 |
indicator-top|left|right|bottom |
<length> | <percentage> |
- |
否 |
导航点指示器在swiper中的相对位置。 |
next-margin7+ |
<length> | <percentage> |
- |
否 |
后边距,用于露出后一项的一小部分。 |
previous-margin7+ |
<length> | <percentage> |
- |
否 |
前边距,用于露出前一项的一小部分。 |
名称 |
参数 |
描述 |
|---|---|---|
change |
{ index: currentIndex } |
当前显示的组件索引变化时触发该事件。 |
rotation |
{ value: rotationValue } |
智能穿戴表冠旋转事件触发时的回调。 |
animationfinish7+ |
- |
动画结束时触发该事件。 |
名称 |
参数 |
描述 |
|---|---|---|
swipeTo |
{ index: number(指定位置) } |
切换到index位置的子组件。 |
showNext |
无 |
显示下一个子组件。 |
showPrevious |
无 |
显示上一个子组件。 |