Commit 056fc131168c4e900e9257c3e03257a390c3d3ba

Authored by vben
1 parent 6d5c49f0

fix(table): index column value error #187

src/components/Table/src/hooks/useColumns.ts
@@ -73,8 +73,7 @@ function handleIndexColumn( @@ -73,8 +73,7 @@ function handleIndexColumn(
73 return `${index + 1}`; 73 return `${index + 1}`;
74 } 74 }
75 const { current = 1, pageSize = PAGE_SIZE } = getPagination; 75 const { current = 1, pageSize = PAGE_SIZE } = getPagination;
76 - const currentIndex = (current - 1) * pageSize + index + 1;  
77 - return currentIndex; 76 + return ((current < 1 ? 1 : current) - 1) * pageSize + index + 1;
78 }, 77 },
79 ...(isFixedLeft 78 ...(isFixedLeft
80 ? { 79 ? {