-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathindex.ts
More file actions
47 lines (37 loc) · 1.47 KB
/
Copy pathindex.ts
File metadata and controls
47 lines (37 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import 'react-native-gesture-handler';
// 设置全局下拉刷新样式
import './demo/pull-to-refresh/PullToRefresh';
import App from './App';
import Navigation from 'hybrid-navigation';
import SafeAreaContextHOC from './demo/SafeAreaContextHOC';
import ActivityIndicator from './demo/activity-indicator/ActivityIndicatorScreen';
import { registerNestedScrollComponent } from './demo/nested-scroll';
import { registerPullToRefreshComponent } from './demo/pull-to-refresh';
import { registerBottomSheetComponent } from './demo/bottom-sheet';
import { registerKeyboardComponent } from './demo/keyboard-insets';
import { registerImageCropComponent } from './demo/image-crop';
import { registerOverlayComponent } from './demo/overlay';
import { registerWheelPickerComponent } from './demo/wheel-picker';
// 配置全局样式
Navigation.setDefaultOptions({
statusBarStyle: 'dark-content',
});
// 重要必须
Navigation.startRegisterComponent(SafeAreaContextHOC);
// 注意,你的每一个页面都需要注册
Navigation.registerComponent('App', () => App);
registerNestedScrollComponent();
registerPullToRefreshComponent();
registerBottomSheetComponent();
registerKeyboardComponent();
registerImageCropComponent();
registerOverlayComponent();
registerWheelPickerComponent();
Navigation.registerComponent('ActivityIndicator', () => ActivityIndicator);
// 重要必须
Navigation.endRegisterComponent();
Navigation.setRoot({
stack: {
children: [{ screen: { moduleName: 'App' } }],
},
});