-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.tsx
51 lines (46 loc) · 1.44 KB
/
index.tsx
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
48
49
50
51
import {Register, setStyle} from 'react-native-awesome-navigation'
import {Image} from 'react-native'
import Home from './src/Home'
import Setting from './src/Setting'
import Detail from './src/Detail'
import Present from './src/Present'
import NoNavigationBar from './src/NoNavigationBar'
import TabBar from './src/TabBar'
// router.activate('alc://')
setStyle({
hideBackTitle: true,
hideNavigationBarShadow: true,
navigationBarColor: '#FFFFFF',
navigationBarItemColor: 'FF84A9',
tabBarColor: '#FFFFFF',
tabBarItemColor: '#FF84A9',
tabBarDotColor: '#FF84A9',
backIcon: Image.resolveAssetSource(require('./src/image/Close.png')),
})
Register.beforeRegister()
Register.registerComponent('Home', Home)
Register.registerComponent('Setting', Setting)
Register.registerComponent('Detail', Detail)
Register.registerComponent('Present', Present)
Register.registerComponent('NoNavigationBar', NoNavigationBar)
Register.registerComponent('TabBar', TabBar)
Register.setRoot({
root: {
bottomTabs: {
children: [
{
component: {
name: 'Home',
options: {title: '主页', icon: Image.resolveAssetSource(require('./src/image/Home.png'))},
},
}, {
component: {
name: 'Setting',
options: {title: '设置', icon: Image.resolveAssetSource(require('./src/image/Setting.png'))},
},
},
],
// options: {tabBarModuleName: 'TabBar'},
},
},
})