import React from "react"; import { VariableSizeList, ListOnScrollProps } from "react-window"; import { ListProps, ListItemProps } from "./List"; import { StyledProps } from "../_type"; export interface VirtualizedListProps extends Omit { /** * 列表项 */ items: VirtualizedListItem[]; /** * 列表高 */ listHeight?: number; /** * 滚动到底部事件 */ onScrollBottom?: (props: ListOnScrollProps) => void; /** * 初始偏移 */ initialScrollOffsetIndex?: number; /** * 虚拟滚动组件 ref */ virtualizedRef?: React.Ref; /** * 用于参照的列表容器 * @default DropdownBox */ container?: React.FunctionComponent | React.ComponentClass | string; /** * 列表容器样式 */ containerStyle?: React.CSSProperties; /** * 列表容器类名 */ containerClassName?: string; } export declare const VirtualizedList: React.ForwardRefExoticComponent>; export declare type VirtualizedListItemType = "tips" | "option" | "group" | "divider"; /** * 虚拟滚动列表项 */ export interface VirtualizedListItem { /** * 列表项类型 */ type: VirtualizedListItemType; /** * 列表项标识 */ key: string; /** * 列表项展示内容 */ text: React.ReactNode; /** * 列表项附加内容 */ props?: ListItemProps; /** * 列表项属性 */ option?: T; }