-
+
Tab 1
-
+
Tab 2
-
-
- Tab 1
-
+
+
+ Tab 1
+
Tab 1
-
-
- Tab 2
-
+
+
+ Tab 2
+
Tab 2
diff --git a/components/tabs/index.vue b/components/tabs/index.vue
index aed9aa73b..99be19621 100644
--- a/components/tabs/index.vue
+++ b/components/tabs/index.vue
@@ -1,7 +1,7 @@
diff --git a/components/tabs/src/Tabs.vue b/components/tabs/src/Tabs.vue
index babb0f479..93605e62b 100644
--- a/components/tabs/src/Tabs.vue
+++ b/components/tabs/src/Tabs.vue
@@ -162,9 +162,8 @@ export default {
$slots.default && $slots.default.forEach(({ componentOptions, key: tabKey }) => {
if (componentOptions) {
if (componentOptions.propsData.tab === undefined) {
- componentOptions.propsData.tab = $slots[`tab_${tabKey}`]
- ? $slots[`tab_${tabKey}`]
- : null
+ const tab = (componentOptions.children || []).filter(({ data = {}}) => data.slot === 'tab')
+ componentOptions.propsData.tab = tab
}
panels.push({ ...componentOptions.propsData, tabKey })
}
diff --git a/components/trigger/index.vue b/components/trigger/index.vue
index bb3cbe58d..8aeaecc1a 100644
--- a/components/trigger/index.vue
+++ b/components/trigger/index.vue
@@ -1,7 +1,7 @@