瀏覽代碼

Merge pull request #1101 from Kingwl/master

Tabs: fix a 'activeName' attribute init bug
baiyaaaaa 8 年之前
父節點
當前提交
73e9e918ae
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      packages/tabs/src/tabs.vue

+ 2 - 1
packages/tabs/src/tabs.vue

@@ -72,8 +72,9 @@
       }
     },
     mounted() {
+      this.currentName = this.activeName || this.$children[0].index || '1';
       this.$nextTick(() => {
-        this.currentName = this.activeName || this.$children[0].index || '1';
+        this.$forceUpdate();
       });
     },
     render(h) {