diff --git a/src/components/carousel/carousel.vue b/src/components/carousel/carousel.vue index b66c475..e84fe5d 100644 --- a/src/components/carousel/carousel.vue +++ b/src/components/carousel/carousel.vue @@ -112,11 +112,6 @@ `${prefixCls}` ]; }, - listStyle () { - return { - width: `${this.trackWidth * 2}px`, - }; - }, trackStyles () { return { width: `${this.trackWidth}px`, @@ -251,7 +246,7 @@ let index = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex; index += offset; while (index < 0) index += slidesLen; - if (((offset > 0 && index === slidesLen) || offset < 0 && index === slidesLen - 1) && this.loop) { + if (((offset > 0 && index === slidesLen) || (offset < 0 && index === slidesLen - 1)) && this.loop) { // 极限值(左滑:当前索引为总图片张数, 右滑:当前索引为总图片张数 - 1)切换轨道 this.showCopyTrack = !this.showCopyTrack; this.trackIndex += offset; -- libgit2 0.21.4