Swiper

API

Attributes

NameDescriptionTypeDefault
initialPage初始页面number0
scrollEnabled激活或关闭滚动booleantrue
pageMarginpageMarginnumber0
focusSearchEnabled激活内部寻焦booleantrue

Events

NameDescriptionType
dropped页面被选中事件Function
dragging页面滚动事件Function
stateChanged页面滚动状态事件Function

Exposes

MethodDescriptionType
setPage根据index选中slideFunction
setPageWithoutAnimation根据index选中slide、无动画Function
next切换到下一页Function
prev切换到上一页Function

Source

Docs