ソースを参照

Carousel: fix async item not refreshing view issue (#3159)

杨奕 8 年 前
コミット
df46ca5c42
1 ファイル変更2 行追加2 行削除
  1. 2 2
      packages/carousel/src/main.vue

+ 2 - 2
packages/carousel/src/main.vue

@@ -96,8 +96,8 @@ export default {
   },
 
   watch: {
-    items() {
-      this.setActiveItem(0);
+    items(val) {
+      if (val.length > 0) this.setActiveItem(0);
     },
 
     activeIndex(val, oldVal) {