From b2c016f5c78120fa118e2830da3a0e380cff843b Mon Sep 17 00:00:00 2001 From: crossjs Date: Wed, 2 Nov 2016 19:43:03 +0800 Subject: [PATCH] bugfix: fix transition for auto sliding --- package.json | 2 +- src/components/c-slider.vue | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6cb0f39..6501df2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "PLATO", - "version": "2.0.1", + "version": "2.0.2", "description": "a Boilerplate for mobile SPAs use vue, vuex, vue-router", "license": "MIT", "main": "src/index.js", diff --git a/src/components/c-slider.vue b/src/components/c-slider.vue index 626ea18..6a72c90 100644 --- a/src/components/c-slider.vue +++ b/src/components/c-slider.vue @@ -119,8 +119,12 @@ export default { if (!this.intervalId) { this.intervalId = setInterval(() => { if (!this.isDragging && this.slideCount > 1) { + this.slideReady = false this.offset = this.minOffset - this.go(this.nextIndex) + // default transtion duration is 200ms + setTimeout(() => { + this.go(this.nextIndex) + }, this.transition ? 200 : 0) } }, this.interval * 1000) }