UNPKG

@jdcfe/yep-react

Version:

一套移动端的React组件库

67 lines (66 loc) 2.35 kB
import * as React from 'react'; export interface PickerProps { prefixCls: string; className?: string; style?: any; selectedValue?: []; defaultSelectedValue?: []; onScrollChange?: (value: any) => void; onValueChange?: (value: any) => void; children: React.ReactNode; noAnimate?: boolean; disabled: boolean; indicatorStyle?: React.CSSProperties; itemStyle?: React.CSSProperties; } export interface ItemProps { className?: string; value?: any; } declare class Picker extends React.Component<PickerProps, any> { static Item: React.FunctionComponent<ItemProps>; static defaultProps: { prefixCls: string; disabled: boolean; }; scrollHandlers: { touchstart: (evt: any) => void; mousedown: (evt: any) => void; touchmove: (evt: any) => void; mousemove: (evt: any) => void; touchend: () => void; touchcancel: () => void; mouseup: () => void; getValue: () => number; scrollTo: (_x: number, y: number, time?: number) => void; setDisabled: (disabled: boolean) => void; }; constructor(props: PickerProps); itemHeight: number; scrollValue: number; rootRef: HTMLDivElement; contentRef: HTMLDivElement; maskRef: HTMLDivElement; indicatorRef: HTMLDivElement; createRootRef(el: HTMLDivElement): void; createMaskRef(el: HTMLDivElement): void; createIndicatorRef(el: HTMLDivElement): void; createContentRef(el: HTMLDivElement): void; passiveSupported(): boolean; onScrollChange(): void; fireValueChange(selectedValue: any): void; scrollingComplete(): void; scrollTo(top: number): void; scrollToWithoutAnimation(top: number): void; componentDidMount(): void; componentWillReceiveProps(nextProps: PickerProps): void; shouldComponentUpdate(nextProps: PickerProps, nextState: any): boolean; componentDidUpdate(): void; componentWillUnmount(): void; select(value: any, itemHeight: number, scrollTo: any): void; selectByIndex(index: number, itemHeight: number, zscrollTo: any): void; computeChildIndex(top: number, itemHeight: number, childrenLength: number): number; doScrollingComplete(top: number, itemHeight: number, fireValueChange: any): void; render(): JSX.Element; } export default Picker;