From 32b8f990713232da98219c08287e3d530e454f75 Mon Sep 17 00:00:00 2001 From: Soybean Date: Sat, 19 Jul 2025 02:28:05 +0800 Subject: [PATCH] fix(table): add type annotations for records in useTable hook --- src/hooks/common/table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/common/table.ts b/src/hooks/common/table.ts index 5484bf36..cee916a1 100644 --- a/src/hooks/common/table.ts +++ b/src/hooks/common/table.ts @@ -43,7 +43,7 @@ export function useTable(config: NaiveUI.NaiveTabl // Ensure that the size is greater than 0, If it is less than 0, it will cause paging calculation errors. const pageSize = size <= 0 ? 10 : size; - const recordsWithIndex = records.map((item, index) => { + const recordsWithIndex = records.map((item: GetTableData, index: number) => { return { ...item, index: (current - 1) * pageSize + index + 1