Carousel: fix interval and scale bug (#20931)

pull/20939/head
好多大米 2021-04-15 14:10:56 +08:00 committed by GitHub
parent 0418a47148
commit 655d89fe0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -98,6 +98,7 @@
this.active = index === activeIndex;
const isVertical = parentDirection === 'vertical';
this.translate = this.calcTranslate(index, activeIndex, isVertical);
this.scale = 1;
}
this.ready = true;
},

View File

@ -159,6 +159,11 @@ export default {
loop() {
this.setActiveItem(this.activeIndex);
},
interval() {
this.pauseTimer();
this.startTimer();
}
},