Skip to content

Commit

Permalink
Carousel: fix interval and scale bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1707 committed Apr 14, 2021
1 parent 0418a47 commit 9258baa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/carousel/src/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down
5 changes: 5 additions & 0 deletions packages/carousel/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ export default {
loop() {
this.setActiveItem(this.activeIndex);
},
interval() {
this.pauseTimer();
this.startTimer();
}
},
Expand Down

0 comments on commit 9258baa

Please sign in to comment.