@itsdapi/taro36-virtual-list
Version:
taro36-virtual-list
53 lines (52 loc) • 1.64 kB
TypeScript
import { Component } from 'react';
import { InferProps } from 'prop-types';
import { VirtualListProps, VirtualListState } from "../../../@types/virtualList";
export default class VirtialList extends Component<VirtualListProps, VirtualListState> {
static propTypes: InferProps<VirtualListProps>;
static defaultProps: VirtualListProps;
constructor(props: VirtualListProps);
componentDidMount(): void;
UNSAFE_componentWillReceiveProps(nextProps: VirtualListProps): void;
private pageHeightArr;
private initList;
private windowHeight;
private currentPage;
private observer;
getSystemInformation: () => void;
/**
* 列表数据渲染完成
*/
handleComplete: () => void;
/**
* 当list是通过服务端分页获取的时候,对list进行处理
* @param list 外部list
* @param pageNum 当前页码
*/
formatMultiList(list?: any[], pageNum?: number): void;
/**
* 按规则分割list,存在私有变量initList,备用
*/
segmentList(list?: any[]): void;
/**
* 将列表格式化为二维
* @param list 列表
*/
formatList(list?: any[]): void;
renderNext: () => void;
/**
* 设置每一个维度的数据渲染完成之后所占的高度
*/
setHeight(list?: any[]): void;
webObserve: () => void;
observerCallBack: (entries: IntersectionObserverEntry[]) => void;
/**
* 监听可视区域
*/
handleObserve: () => void;
/**
* 小程序平台监听
*/
miniObserve: () => void;
handleScroll: (...args: any[]) => void;
render(): JSX.Element;
}