File tree Expand file tree Collapse file tree 1 file changed +1
-24
lines changed
Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments