fix(components): [virtual-list] fix type error (#9780)

This commit is contained in:
LIUCHAO
2022-09-16 07:50:17 +08:00
committed by GitHub
parent 4d1cb2dbe5
commit 5bcccfd756

View File

@@ -1,4 +1,3 @@
// @ts-nocheck
import {
buildProp,
buildProps,
@@ -143,7 +142,13 @@ export const virtualizedGridProps = buildProps({
initScrollTop: initScrollOffset,
itemKey: {
type: definePropType<GridItemKeyGetter>(Function),
default: ({ columnIndex, rowIndex }) => `${rowIndex}:${columnIndex}`,
default: ({
columnIndex,
rowIndex,
}: {
columnIndex: number
rowIndex: number
}) => `${rowIndex}:${columnIndex}`,
},
rowCache: cache,
rowHeight: itemSize,