From 6e3e52bb775ad254ed33f6ea5100d891c65aaf99 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 9 Sep 2021 16:56:56 +0800 Subject: [PATCH] refactor: table --- components/table/Table.tsx | 5 +- components/table/demo/expand.vue | 9 ++- .../table/demo/fixed-columns-header.vue | 8 ++- components/table/demo/fixed-columns.vue | 8 ++- components/table/demo/head.vue | 33 +--------- components/table/demo/nested-table.vue | 65 ++++++++++--------- components/table/demo/reset-filter.vue | 8 +-- components/table/demo/stripe.vue | 4 +- components/vc-table/Cell/index.tsx | 8 ++- components/vc-table/FixedHolder/index.tsx | 6 +- components/vc-table/Footer/index.tsx | 1 + components/vc-table/Table.tsx | 8 ++- components/vc-util/Dom/addEventListener.js | 4 +- site/debugger/index.tsx | 2 +- 14 files changed, 84 insertions(+), 85 deletions(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index c3eade7ed..866a74d9b 100644 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -114,7 +114,10 @@ export const tableProps = () => { columns: { type: Array as PropType, default: undefined }, rowKey: { type: [String, Function] as PropType, default: undefined }, tableLayout: { type: String as PropType, default: undefined }, - rowClassName: { type: String as PropType, default: undefined }, + rowClassName: { + type: [String, Function] as PropType, + default: undefined, + }, title: { type: Function as PropType, default: undefined }, footer: { type: Function as PropType, default: undefined }, id: { type: String as PropType, default: undefined }, diff --git a/components/table/demo/expand.vue b/components/table/demo/expand.vue index 37bc64475..db820fc39 100644 --- a/components/table/demo/expand.vue +++ b/components/table/demo/expand.vue @@ -18,8 +18,11 @@ When there's too much information to show and the table can't display all at onc