From 1db2d64ddce69aa99b61753e944bfb02ec059ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=95?= Date: Tue, 13 Dec 2016 10:36:10 +0800 Subject: [PATCH] Tabs: fix empty tab-pane issue, fixed #1608 (#1672) --- packages/tabs/src/tabs.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tabs/src/tabs.vue b/packages/tabs/src/tabs.vue index 62feae59c..aabef15cf 100644 --- a/packages/tabs/src/tabs.vue +++ b/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(); });