[fix bug] carousel component: remove no use code

This commit is contained in:
houyl 2017-10-25 09:30:46 +08:00
parent ccf544dcc2
commit 610fd3a500

View file

@ -112,11 +112,6 @@
`${prefixCls}` `${prefixCls}`
]; ];
}, },
listStyle () {
return {
width: `${this.trackWidth * 2}px`,
};
},
trackStyles () { trackStyles () {
return { return {
width: `${this.trackWidth}px`, width: `${this.trackWidth}px`,
@ -251,7 +246,7 @@
let index = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex; let index = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex;
index += offset; index += offset;
while (index < 0) index += slidesLen; 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 // - 1
this.showCopyTrack = !this.showCopyTrack; this.showCopyTrack = !this.showCopyTrack;
this.trackIndex += offset; this.trackIndex += offset;