# React-Native-Examples **Repository Path**: Royce_he/React-Native-Examples ## Basic Information - **Project Name**: React-Native-Examples - **Description**: React-Native-Examples - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-05-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### ListViewLoading 高阶组件withEmptyView 封装DLFlatList 和 EmptyProps ``` index.toString()} onReloadHandler={this.loadOrders} /> ``` * withEmptyView高阶组件函数,loadData方法直接获取网络请求,判断处理loading状态 * 下拉加载不触发loading ##### 页面反馈 ```mermaid graph TD 加载 --> C{网络层返回} C -->|错误:无网络和非200| A[网络错误描述-重试按钮] C -->|业务错误| B[业务错误码-重试按钮] C -->|成功| E[展示数据] C -->|无数据| F[文字描述-数据图片] ``` | type | 描述 |description | | --- | --- | --- | --- | | StatusInfo | {imageSource: Object,title: string,code?: number} |状态描述, 文字,错误码 | | props | type |require | description | | --- | --- | --- | --- | | onReloadHandler | ()=>Void | true | 刷新方法 | | refreshState | RefreshState | false | 只是代表listView header footer的刷新状态| | noDataInfo | StatusInfo| false | 自定义无数据属性 | | loadingInfo | StatusInfo | false | 加载中属性 | | errorInfo | StatusInfo | false | 无数据属性 | | failInfo | StatusInfo | false | 业务失败属性 | | containerStyle | Object | false | 整个容器样式 | | imageStyle | Object | false | 图片样式 | | textWrapStyle | Object| false | 描述文字容器样式 | | textStyle | Object| false | 描述文字样式 | | reloadButton | Element | false | 自定义重试按钮 | | reloadButtonStyle | Object| false | 重试按钮样式 | | reloadButtonTextStyle | Object| false | 重试按钮文字样式 | ##### demo操作演示 [代码地址](https://gitee.com/Royce_he/React-Native-Examples) 首次加载出错,下拉成功取数据