Skip to content

Commit e5ce102

Browse files
cs1707abigail-0111
authored andcommitted
Carousel: fix interval and scale bug (ElemeFE#20931)
1 parent d84ee39 commit e5ce102

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/carousel/src/item.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
this.active = index === activeIndex;
9999
const isVertical = parentDirection === 'vertical';
100100
this.translate = this.calcTranslate(index, activeIndex, isVertical);
101+
this.scale = 1;
101102
}
102103
this.ready = true;
103104
},

packages/carousel/src/main.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ export default {
159159
160160
loop() {
161161
this.setActiveItem(this.activeIndex);
162+
},
163+
164+
interval() {
165+
this.pauseTimer();
166+
this.startTimer();
162167
}
163168
},
164169

0 commit comments

Comments
 (0)