Explorar o código

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

杨奕 %!s(int64=8) %!d(string=hai) anos
pai
achega
1db2d64ddc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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();
       });