Commit 610fd3a5002fd2884f35bf36e78baf793369eab9
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 | 112 | `${prefixCls}` |
| 113 | 113 | ]; |
| 114 | 114 | }, |
| 115 | - listStyle () { | |
| 116 | - return { | |
| 117 | - width: `${this.trackWidth * 2}px`, | |
| 118 | - }; | |
| 119 | - }, | |
| 120 | 115 | trackStyles () { |
| 121 | 116 | return { |
| 122 | 117 | width: `${this.trackWidth}px`, |
| ... | ... | @@ -251,7 +246,7 @@ |
| 251 | 246 | let index = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex; |
| 252 | 247 | index += offset; |
| 253 | 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 | 250 | // 极限值(左滑:当前索引为总图片张数, 右滑:当前索引为总图片张数 - 1)切换轨道 |
| 256 | 251 | this.showCopyTrack = !this.showCopyTrack; |
| 257 | 252 | this.trackIndex += offset; | ... | ... |