import * as React from "react"; import {StyleProp, TextStyle} from "react-native"; import {PageProps} from "../page"; import {NativeSyntheticEvent} from "react-native/Libraries/Types/CoreEventTypes"; import {NativeScrollEvent, PointProp} from "react-native/Libraries/Components/ScrollView/ScrollView"; export type IProps = PageProps & { readonly refName?: string isDebug?: boolean children?: React.ReactNode style?: StyleProp /** * 是否显示loading */ // hasLoading?: boolean /** * loading view */ // loadingView?: React.ReactNode /** * 是否横屏滚动 * navigation 必传,不然无法滚动 */ hasHorizontal?: boolean /** * hasHorizontal 为 true 时,必传参数 */ navigation?: any /** * 是否显示垂直滚动条 */ hasBarVertical?: boolean /** * 是否显示水平滚动条 */ hasBarHorizontal?: boolean /** * 是否滚动到底部 */ hasScrollToEnd?: boolean /** * 是否自动滚动到底部 * 必须配合 hasScrollToEnd 使用 */ hasAutoScrollToEnd?: boolean /** * 滚动到底部参数 */ scrollToEndParams?: ScrollToEndParams /** * 是否显示刷新loading */ hasRefreshing?: boolean /** * 刷新操作 */ onRefresh?: () => void /** * 分页操作 */ onPaging?: () => void // 滑动时获取 onScroll?: | ((event: NativeSyntheticEvent) => void) | undefined; // 滑动距离 contentOffset?: PointProp } export type ScrollToEndParams = { // 启用平滑滚动动画 animated: boolean // 时间 duration: number }