基于antd V4 Table 虚拟滚动 + 可拖拽列宽
index.tsx
import React, {useLayoutEffect, useState, useEffect, useMemo} from 'react'
import {Table} from 'antd'
import { getTableScroll } from './common'
import { VList } from 'virtuallist-antd'
import {Resizable} from 'react-resizable'
import 'react-resizable/css/styles.css'
type TableType = {
rowKey?: any,
bordered?: boolean,
onChange?: any,
pagination?: any,
rowClassName?: any,
scroll?: any,
rowSelection?: any,
dataSource: any,
expandable?: any
expandIconAsCell?: any,
expandedRowKeys?: any
showExpandColumn?: any,
expandIconColumnIndex?: number,
columns: any,
virtualList?: boolean
}
const ResizeableTitle = (props) => {
const { onResize, width, ...restProps } = props
if (!width) {
return