Переглянути джерело

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();
       });