From adec5211f1c9acc56e067ded862eaa5db27f90f2 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 17 Feb 2023 09:49:21 +0800 Subject: [PATCH] feat: table add expandColumnTitle slot --- components/table/Table.tsx | 1 + components/table/context.ts | 1 + components/table/demo/expand.vue | 5 ++++- components/vc-table/hooks/useColumns.tsx | 6 ++++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 978c9227e..1d57c6cbb 100644 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -205,6 +205,7 @@ const InteralTable = defineComponent< 'headerCell', 'customFilterIcon', 'customFilterDropdown', + 'expandColumnTitle', ], setup(props, { attrs, slots, expose, emit }) { devWarning( diff --git a/components/table/context.ts b/components/table/context.ts index eb873d0b4..5108465bb 100644 --- a/components/table/context.ts +++ b/components/table/context.ts @@ -9,6 +9,7 @@ export type ContextSlots = { footer?: (...args: any[]) => any; summary?: (...args: any[]) => any; bodyCell?: (...args: any[]) => any; + expandColumnTitle?: (...args: any[]) => any; headerCell?: (...args: any[]) => any; customFilterIcon?: (...args: any[]) => any; customFilterDropdown?: (...args: any[]) => any; diff --git a/components/table/demo/expand.vue b/components/table/demo/expand.vue index 5526b16d5..f0a1d2988 100644 --- a/components/table/demo/expand.vue +++ b/components/table/demo/expand.vue @@ -17,7 +17,7 @@ When there's too much information to show and the table can't display all at onc