Эх сурвалжийг харах

carousel: be able to switch autoplay state

Geeku 8 жил өмнө
parent
commit
39564cb7e8

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

@@ -109,6 +109,10 @@ export default {
     activeIndex(val, oldVal) {
       this.resetItemPosition();
       this.$emit('change', val, oldVal);
+    },
+
+    autoplay(val) {
+      val ? this.startTimer() : this.pauseTimer();
     }
   },