活动按钮状态流转
This commit is contained in:
10
uni_modules/zebra-swiper/libs/slide/slideToLoop.js
Normal file
10
uni_modules/zebra-swiper/libs/slide/slideToLoop.js
Normal file
@@ -0,0 +1,10 @@
|
||||
export default function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) {
|
||||
const swiper = this;
|
||||
let newIndex = index;
|
||||
|
||||
if (swiper.params.loop) {
|
||||
newIndex += swiper.loopedSlides;
|
||||
}
|
||||
|
||||
return swiper.slideTo(newIndex, speed, runCallbacks, internal);
|
||||
}
|
||||
Reference in New Issue
Block a user