Skip to content

Commit

Permalink
fix(taro-components): 修复circular为true却不会循环播放的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
A0150315 authored Aug 10, 2019
1 parent 77baeac commit 6db21b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/taro-components/src/components/swiper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ class Swiper extends Nerv.Component {
}
// 是否衔接滚动模式
if (nextProps.circular) {
this.mySwiper.loopDestroy()
this.mySwiper.loopCreate()
this.mySwiper.slideToLoop(parseInt(nextCurrent, 10)) // 更新下标
} else {
this.mySwiper.slideTo(parseInt(nextCurrent, 10)) // 更新下标
Expand Down

0 comments on commit 6db21b7

Please sign in to comment.