Skip to content

Commit a6e515e

Browse files
authored
Update README.md
1 parent eaa402f commit a6e515e

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

README.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,9 @@ android自动刷新组件见[react-native-SmartRefreshLayout](https://github.com
66
## 第二步
77
运行 `react-native link react-native-mjrefresh`
88
## 第三部使用
9-
修改react-native/Libaries/Components/ScrollView/ScrollView.js
10-
```js
11-
12-
...
13-
if(Platform.ios === 'ios'){
14-
nativeOnlyProps = {
15-
nativeOnly: {
16-
onMomentumScrollBegin: true,
17-
onMomentumScrollEnd : true,
18-
onScrollBeginDrag: true,
19-
onScrollEndDrag: true,
20-
}
21-
};
22-
RCTScrollView = requireNativeComponent(
23-
'RCTMJScrollView',//此处修改为RCTMJScrollView即可
24-
(ScrollView: React.ComponentType<any>),
25-
nativeOnlyProps,
26-
);
27-
RCTScrollContentView = requireNativeComponent('RCTMJScrollContentView', View);//此处修改为RCTMJScrollContentView
28-
29-
...
30-
}
31-
32-
```
339
在工程中导入:
3410
```js
11+
import MJRefresh,{ScrollView} from 'react-native-mjrefresh'
3512
state={
3613
text:'下拉刷新'
3714
}

0 commit comments

Comments
 (0)