소스 검색

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) {