From 3447a062b636a469089d6e9bdcfcb3dce9063ee5 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Thu, 10 Apr 2025 21:50:20 +0200 Subject: [PATCH] feat(Tabs): add `list-leading` and `list-trailing` slots (#3837) Co-authored-by: Benjamin Canac --- playground/app/pages/components/tabs.vue | 8 ++++++++ src/runtime/components/Tabs.vue | 14 ++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/playground/app/pages/components/tabs.vue b/playground/app/pages/components/tabs.vue index 6392ee71..434b45e0 100644 --- a/playground/app/pages/components/tabs.vue +++ b/playground/app/pages/components/tabs.vue @@ -59,6 +59,14 @@ const items = [{ + + diff --git a/src/runtime/components/Tabs.vue b/src/runtime/components/Tabs.vue index 07e53c21..4d980692 100644 --- a/src/runtime/components/Tabs.vue +++ b/src/runtime/components/Tabs.vue @@ -73,10 +73,12 @@ export interface TabsEmits extends TabsRootEmits {} type SlotProps = (props: { item: T, index: number }) => any export type TabsSlots = { - leading: SlotProps - default: SlotProps - trailing: SlotProps - content: SlotProps + 'leading': SlotProps + 'default': SlotProps + 'trailing': SlotProps + 'content': SlotProps + 'list-leading': (props?: {}) => any + 'list-trailing': (props?: {}) => any } & DynamicSlots @@ -114,6 +116,8 @@ const ui = computed(() => tabs({ + + @@ -126,6 +130,8 @@ const ui = computed(() => tabs({ + +