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