Commit 67495b8a authored by chenshouchao's avatar chenshouchao

nothing

parent 4ce9b35d
...@@ -33,6 +33,7 @@ interface IVirtuallyTableProps { ...@@ -33,6 +33,7 @@ interface IVirtuallyTableProps {
handleRow?: any; // 点击一行 handleRow?: any; // 点击一行
activeId?: string; // 选中的一行的id activeId?: string; // 选中的一行的id
disableFn?: any; // 禁用时根据disableFn来判断是否禁用 disableFn?: any; // 禁用时根据disableFn来判断是否禁用
headerHeight?: number; // 表头高度
} }
const theme = createTheme({ const theme = createTheme({
...@@ -86,6 +87,7 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => { ...@@ -86,6 +87,7 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
handleRow, handleRow,
activeId, activeId,
disableFn, disableFn,
headerHeight = 59,
} = props; } = props;
const virtuallyTableBoxRef: any = useRef(null); const virtuallyTableBoxRef: any = useRef(null);
...@@ -186,7 +188,7 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => { ...@@ -186,7 +188,7 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
ref={virtuallyTableRef} ref={virtuallyTableRef}
width={width} width={width}
height={height} height={height}
headerHeight={59} headerHeight={headerHeight}
rowHeight={54} rowHeight={54}
rowCount={rows.length} rowCount={rows.length}
rowGetter={({ index }: any) => rows[index]} rowGetter={({ index }: any) => rows[index]}
...@@ -313,7 +315,7 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => { ...@@ -313,7 +315,7 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
position: "absolute", position: "absolute",
bottom: 0, bottom: 0,
width: `${width}px`, width: `${width}px`,
height: `${height - 59}px`, height: `${height - headerHeight}px`,
}} }}
/> />
)} )}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment