基于android SmartRefreshLayout的封装
npm install react-native-smartrefreshlayout-nextnpm install --save react-native-smartrefreshlayout 或者 yarn add react-native-smartrefreshlayout(已经安装了yarn)react-native link react-native-smartrefreshlayoutjs
import {SmartRefreshControl,ClassicsHeader,StoreHouseHeader,DefaultHeader} from 'react-native-smartrefreshlayout';//使用方法和RN官方的RefreshControl类似,
refreshControl={ ref={refreshcontrol=>this.refreshControl=refreshcontrol}
HeaderComponent={ }
onRefresh={()=>{
setTimeout(()=>{
this.refreshControl && this.refreshControl.finishRefresh();
},1000)
}}
/>}
>
``注意:HeaderComponet现在只能是插件提供的Header,后续我们将改进与提供任何Component
#### 方法表格
|方法名|参数|描述|
|:---:|:---:|:---:|
|finishRefresh|{delayed:number,success:bool}|完成刷新|

