Procházet zdrojové kódy

Carousel: fix interval and scale bug (#20931)

好多大米 před 4 roky
rodič
revize
655d89fe0e

+ 1 - 0
packages/carousel/src/item.vue

@@ -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;
       },

+ 5 - 0
packages/carousel/src/main.vue

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