@jdcfe/yep-react
Version:
一套移动端的React组件库
73 lines (72 loc) • 2.6 kB
TypeScript
import * as React from 'react';
import ListView from './ListView';
export interface IndexedListProps {
prefixCls?: string;
listPrefixCls?: string;
className?: string;
style?: React.CSSProperties;
showIndicator?: boolean;
data: any;
renderSectionHeader: (sectionData: string, sectionId: string) => React.ReactNode;
renderRow: (rowData: any, index?: number, sectionID?: string) => React.ReactNode;
renderSectionWrapper?: (sectionId: string) => React.ReactNode;
quickIndexedBarTop?: any;
useBodyScroll?: boolean;
onQuickSearch: (sectionID: string, topId?: string) => void;
indexedBarStyle?: React.CSSProperties;
indicatorStyle?: React.CSSProperties;
enableQuickIndexedBarTop?: boolean;
activeBar?: string;
keyLabel: string;
renderHeader?: () => React.ReactNode;
renderFooter?: () => React.ReactNode;
renderBodyComponent: () => React.ReactNode;
}
export default class IndexedList extends React.PureComponent<IndexedListProps, any> {
static defaultProps: {
prefixCls: string;
listPrefixCls: string;
style: {};
indexedBarStyle: {};
indicatorStyle: {};
showIndicator: boolean;
renderSectionHeader: (sectionData: string) => JSX.Element;
quickIndexedBarTop: {
label: string;
value: string;
};
useBodyScroll: boolean;
onQuickSearch: () => null;
enableQuickIndexedBarTop: boolean;
keyLabel: string;
renderBodyComponent: () => JSX.Element;
};
sectionComponents: any;
indicator: HTMLDivElement;
indexedBar: HTMLUListElement;
indexedListView: ListView;
_indicatorTimer: number;
_hCache: any;
_target: any;
_basePos: any;
_qsHeight: any;
_avgH: any;
constructor(props: IndexedListProps);
createIndicatorRef(el: HTMLDivElement): void;
createIndexedBarRef(el: HTMLUListElement): void;
_disableParent(e: any): void;
onQuickSearchTop(sectionID: any, topId: string): void;
onQuickSearch: (sectionID: string) => void;
updateIndicator(ele: HTMLDivElement, end?: boolean): void;
onTouchStart(e: React.TouchEvent<HTMLUListElement>): void;
onTouchMove(e: React.TouchEvent<HTMLUListElement>): void;
onTouchEnd(): void;
componentDidMount(): void;
componentDidUpdate(): void;
componentWillUnmount(): void;
getQsInfo(): void;
componentWillReceiveProps(nextProps: IndexedListProps): void;
renderIndexedBar(): JSX.Element;
renderIndicator(): false | JSX.Element | undefined;
render(): JSX.Element;
}