Преглед на файлове

Carousel: fix interval and scale bug (#20931)

好多大米 преди 4 години
родител
ревизия
655d89fe0e
променени са 2 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 1 0
      packages/carousel/src/item.vue
  2. 5 0
      packages/carousel/src/main.vue

+ 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();
     }
   },