Skip to content

Commit

Permalink
Merge pull request #4547 from neuyu/master
Browse files Browse the repository at this point in the history
fix(taro component): 1.3.9版本误删,导致无法衔接滚动
  • Loading branch information
ZakaryCode authored Mar 6, 2020
2 parents bf6fa39 + c68da48 commit 991f7ee
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()
if (nextProps.current !== 0) this.mySwiper.slideToLoop(parseInt(nextCurrent, 10)) // 更新下标
} else {
if (nextProps.current !== 0) this.mySwiper.slideTo(parseInt(nextCurrent, 10)) // 更新下标
Expand Down

0 comments on commit 991f7ee

Please sign in to comment.