Skip to content

Commit f81cee6

Browse files
authored
Update README.md
1 parent 3259906 commit f81cee6

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# react-native-SmartRefreshLayout[![npm version](https://badge.fury.io/js/react-native-smartrefreshlayout.svg)](https://badge.fury.io/js/react-native-smartrefreshlayout)
22
基于android SmartRefreshLayout https://github.com/scwang90/SmartRefreshLayout 开发的插件,可提供类似ios的弹性刷新、加载
33
## 第一步
4-
工程目录下运行 npm install --save react-native-smartrefreshlayout 或者 yarn add react-native-smartrefreshlayout(已经安装了yarn)
4+
工程目录下运行 `npm install --save react-native-smartrefreshlayout` 或者 `yarn add react-native-smartrefreshlayout`(已经安装了yarn)
55
## 第二步
6-
运行 react-native link react-native-smartrefreshlayout
6+
运行 `react-native link react-native-smartrefreshlayout`
77
## 第三部使用
88
在工程中导入:
9-
```bash
10-
import {SmartRefreshControl,ClassicsHeader,StoreHouseHeader} from 'react-native-smartrefreshlayout';
9+
```js
10+
import {SmartRefreshControl,ClassicsHeader,StoreHouseHeader,DefaultHeader} from 'react-native-smartrefreshlayout';
1111

1212
//使用方法和RN官方的RefreshControl类似,
1313
<ScrollView
1414
refreshControl={<SmartRefreshControl
1515
    ref={refreshcontrol=>this.refreshControl=refreshcontrol}
16-
HeaderComponent={<ClassicsHeader/>}
16+
HeaderComponent={<DefaultHeader/>}
1717
onRefresh={()=>{
1818
setTimeout(()=>{
1919
this.refreshControl && this.refreshControl.finishRefresh();

0 commit comments

Comments
 (0)