Jelajahi Sumber

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

杨奕 8 tahun lalu
induk
melakukan
1db2d64ddc
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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();
       });