From bbf4ee223f7413874392bc259ca53386fc4e0d40 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 28 Jun 2018 17:41:25 +0800 Subject: [PATCH] fixed Carousel dot bug when not use v-model --- examples/routers/carousel.vue | 56 +++++++++++++++++++++++++++----------------------------- src/components/carousel/carousel.vue | 1 + 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/examples/routers/carousel.vue b/examples/routers/carousel.vue index e8e411f..aba3599 100644 --- a/examples/routers/carousel.vue +++ b/examples/routers/carousel.vue @@ -1,44 +1,42 @@ + - - diff --git a/src/components/carousel/carousel.vue b/src/components/carousel/carousel.vue index c1c9180..c412b93 100644 --- a/src/components/carousel/carousel.vue +++ b/src/components/carousel/carousel.vue @@ -227,6 +227,7 @@ } else { this.trackIndex = index; } + this.currentIndex = index; }, add (offset) { // 获取单个轨道的图片数 -- libgit2 0.21.4