From 071241f8cbeb1c0a1f5ab31c7c3da75776dbd2b1 Mon Sep 17 00:00:00 2001 From: Soybean Date: Wed, 8 May 2024 10:33:55 +0800 Subject: [PATCH] fix(styles): fix useTable type --- packages/hooks/src/use-table.ts | 6 ------ src/typings/naive-ui.d.ts | 11 +++++++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/hooks/src/use-table.ts b/packages/hooks/src/use-table.ts index 2de1c0ef..6c2ae07c 100644 --- a/packages/hooks/src/use-table.ts +++ b/packages/hooks/src/use-table.ts @@ -57,12 +57,6 @@ export type TableConfig = { * @default true */ immediate?: boolean; - /** - * whether to display the total items count - * - * @default false - */ - showTotal?: boolean; }; export default function useHookTable(config: TableConfig) { diff --git a/src/typings/naive-ui.d.ts b/src/typings/naive-ui.d.ts index 6bd5f4cf..cde80bab 100644 --- a/src/typings/naive-ui.d.ts +++ b/src/typings/naive-ui.d.ts @@ -42,6 +42,13 @@ declare namespace NaiveUI { type NaiveTableConfig = Pick< import('@sa/hooks').TableConfig, TableColumn>>>, - 'apiFn' | 'apiParams' | 'columns' | 'immediate' | 'showTotal' - >; + 'apiFn' | 'apiParams' | 'columns' | 'immediate' + > & { + /** + * whether to display the total items count + * + * @default false + */ + showTotal?: boolean; + }; }