carousel: be able to switch autoplay state

pull/5113/head
Geeku 2017-05-27 17:22:05 +08:00 committed by 杨奕
parent 0d5b7c0341
commit 39564cb7e8
1 changed files with 4 additions and 0 deletions

View File

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