Commit 610fd3a5002fd2884f35bf36e78baf793369eab9

Authored by houyl
1 parent ccf544dc

[fix bug] carousel component: remove no use code

Showing 1 changed file with 1 additions and 6 deletions   Show diff stats
src/components/carousel/carousel.vue
@@ -112,11 +112,6 @@ @@ -112,11 +112,6 @@
112 `${prefixCls}` 112 `${prefixCls}`
113 ]; 113 ];
114 }, 114 },
115 - listStyle () {  
116 - return {  
117 - width: `${this.trackWidth * 2}px`,  
118 - };  
119 - },  
120 trackStyles () { 115 trackStyles () {
121 return { 116 return {
122 width: `${this.trackWidth}px`, 117 width: `${this.trackWidth}px`,
@@ -251,7 +246,7 @@ @@ -251,7 +246,7 @@
251 let index = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex; 246 let index = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex;
252 index += offset; 247 index += offset;
253 while (index < 0) index += slidesLen; 248 while (index < 0) index += slidesLen;
254 - if (((offset > 0 && index === slidesLen) || offset < 0 && index === slidesLen - 1) && this.loop) { 249 + if (((offset > 0 && index === slidesLen) || (offset < 0 && index === slidesLen - 1)) && this.loop) {
255 // 极限值(左滑:当前索引为总图片张数, 右滑:当前索引为总图片张数 - 1)切换轨道 250 // 极限值(左滑:当前索引为总图片张数, 右滑:当前索引为总图片张数 - 1)切换轨道
256 this.showCopyTrack = !this.showCopyTrack; 251 this.showCopyTrack = !this.showCopyTrack;
257 this.trackIndex += offset; 252 this.trackIndex += offset;