| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- interface AyPageInfo {
- /**
- * 页码
- */
- page?: number
- /**
- * 每页数据量
- */
- size?: number
- /**
- * 总页数
- */
- pages?: number
- }
- /**
- * 通知当前数据加载完毕方法参数
- */
- interface AyContainerMethodsLoadedArgs {
- /**
- * 加载完成后的提示文案 默认 '没有更多了'
- */
- finishedText?: string
- /**
- * 加载过程中的提示文案 默认 '加载中...'
- */
- loadingText?: string
- /**
- * 加载失败后的提示文案 默认 '加载失败'
- */
- errorText?: string
- /**
- * 请求状态
- */
- reqState: enums.ReqState
- /**
- * 总页数
- */
- pages?: number
- }
- /**
- * 分页组件加载数据事件参数
- */
- interface AyContainerRefreshArgs extends AyPageInfo {
- /**
- * true:上拉加载,false:下拉更新
- */
- isAdd?: boolean
- }
- interface AyContainerEntryArgs {
- /**
- * 生命周期类型
- */
- loadType?: enums.LoadType
- /**
- * 页面参数
- */
- query?: AnyObject
- // options?: Parameters<Parameters<typeof onShow>[0]>[0]
- /**
- * 分页组件加载数据事件参数
- */
- cras?: AyContainerRefreshArgs
- /** 扩展参数 */
- exts?
- }
- /**
- * 分页组件方法
- */
- interface AyContainerPullMethods {
- onLoad?(): void
- /**
- * 通知分页组件当前数据加载完毕
- */
- loaded?(args: AyContainerMethodsLoadedArgs): void
- /**
- * 分页组件加载数据-内部方法
- */
- refresh?(args: AyContainerRefreshArgs): void
- /** 容器通知页面加载数据 */
- containerRefresh?(args: AyContainerRefreshArgs): void
- }
- /**
- 页面生命周期入口的回调函数
- */
- type AyEntranceCallBack = (args?: AyContainerEntryArgs) => void
- interface AyEntranceExt {
- /**
- * 追加拦截的生命周期函数
- */
- addLoadTypes?: Array<enums.LoadType>
- /** 分页组件加载数据事件参数默认值 */
- defAyContainerRefreshArgs?: AyContainerRefreshArgs
- }
- /**
- 页面生命周期入口,默认拦截enums.LoadType.onLoad、enums.LoadType.refresh, 可配置enums.LoadType 枚举
- */
- type AyEntrance = (callback?: AyEntranceCallBack, ext?: AyEntranceExt) => void
- /**
- 通知当前数据加载完毕方法参数
- */
- type AyContainerLoaded = (args: AyContainerMethodsLoadedArgs) => void
|