소스 검색

Tabs: fix empty tab-pane issue, fixed #1608 (#1672)

杨奕 8 년 전
부모
커밋
1db2d64ddc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/tabs/src/tabs.vue

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

@@ -82,7 +82,7 @@
       }
     },
     mounted() {
-      this.currentName = this.activeName || this.$children[0].index || '1';
+      this.currentName = this.activeName || this.$children[0] && this.$children[0].index || '1';
       this.$nextTick(() => {
         this.$forceUpdate();
       });