From a8b4a3a036e2ce4a275e9d60ec443ea2c38a56f6 Mon Sep 17 00:00:00 2001 From: barbapapazes Date: Mon, 16 Jun 2025 12:01:11 +0200 Subject: [PATCH] feat(table): add body top and bottom slots --- playground/app/pages/components/table.vue | 12 ++++++++++++ src/runtime/components/Table.vue | 14 ++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/playground/app/pages/components/table.vue b/playground/app/pages/components/table.vue index 46c3799b8b..b83692ff50 100644 --- a/playground/app/pages/components/table.vue +++ b/playground/app/pages/components/table.vue @@ -362,6 +362,18 @@ onMounted(() => { + + + +
diff --git a/src/runtime/components/Table.vue b/src/runtime/components/Table.vue index f66a68c1ff..8daf87db64 100644 --- a/src/runtime/components/Table.vue +++ b/src/runtime/components/Table.vue @@ -173,10 +173,12 @@ type DynamicHeaderSlots = Record = Record) => any> & Record<`${K extends string ? K : never}-cell`, (props: CellContext) => any> export type TableSlots = { - expanded: (props: { row: Row }) => any - empty: (props?: {}) => any - loading: (props?: {}) => any - caption: (props?: {}) => any + 'expanded': (props: { row: Row }) => any + 'empty': (props?: {}) => any + 'loading': (props?: {}) => any + 'caption': (props?: {}) => any + 'body-top': (props?: {}) => any + 'body-bottom': (props?: {}) => any } & DynamicHeaderSlots & DynamicCellSlots @@ -369,6 +371,8 @@ defineExpose({ + +