import React, { CSSProperties, ReactNode } from 'react'; import { DraggableProvided } from 'react-beautiful-dnd'; import { FixedSizeListProps, Layout } from 'react-window'; export interface IListData { [propsName: string]: any; } export interface DragItemProps { provided: DraggableProvided; style?: CSSProperties; } export interface VirtualProps extends Omit, 'height' | 'width' | 'children' | 'itemCount'> { /** 列表高度 */ height?: number | string; /** 宽度 */ width?: number | string; /** item高度 */ itemSize: number; /** 布局 */ layout?: Layout | undefined; } export interface IListProps extends React.HTMLAttributes { /** 数据 */ data: Array; /** 虚拟列表 */ virtual?: VirtualProps; /** 自定义类名 */ className?: string; /** 行内样式 */ style?: CSSProperties; /** 加载总loading */ loading?: boolean; /** 自定义渲染列表项 */ renderItem: (item: T, index?: number) => ReactNode; }