-
Notifications
You must be signed in to change notification settings - Fork 1
/
Route.js
44 lines (40 loc) · 1.06 KB
/
Route.js
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
import React from 'react';
import {
Text,
View,
TouchableWithoutFeedback
} from 'react-native';
import Gestures from './RN/Gestures/Route'
import Animations from "./RN/Animations/Route"
import Listviews from "./RN/ListView/Route"
import Components from "./RN/Components/Route"
import Natives from "./RN/Native/Route"
export default {
routeCfg:{
...Gestures,
...Animations,
...Listviews,
...Components,
...Natives,
},
routeOpt:{
//OPT
initialRouteName: 'Home',
navigationOptions:({ navigation }) => ( { //这是一个函数,可以接受三个参数,但是常用的而是这一个
headerStyle: {
backgroundColor: "#98F5FF",
},
headerTitleStyle: {
color: "#FFDAB9",
fontSize: 18
},
headerTintColor: "#7FFFD4",
headerBackTitle: null,
headerLeft: (<View style={{ width: 40, height: 44, alignItems: 'center', justifyContent: 'center', backgroundColor:"#ff0000" }}>
<TouchableWithoutFeedback onPress={() => { navigation.goBack() }}>
<View><Text>返回</Text></View>
</TouchableWithoutFeedback>
</View>),
})
}
}