index.js
2.13 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* Created by yzdd on 2018/3/11.
*/
import React from 'react'
import {View, Text, Image, StyleSheet, TouchableOpacity, TouchableWithoutFeedback} from 'react-native'
import {observer} from 'mobx-react/native'
import {StackNavigator, TabNavigator, TabBarBottom, SafeAreaView} from 'react-navigation'
import CardStackStyleInterpolator from "react-navigation/src/views/CardStack/CardStackStyleInterpolator"
import {fromBottom, fromRight, fromBottomLikeAndroid} from "./utils/navigationUtil";
import TBHome from "./pages/TBHome";
import TBSearch from "./pages/TBSearch";
import AddTB from "./pages/AddTB";
import Test from "./pages/Test";
import OperationUnitModal from "./pages/modal/OperationUnitModal";
import AddDetail from "./pages/AddDetail";
import PlaceDeparture from "./pages/PlaceDeparture";
import TBOrderDetail from "./pages/TBOrderDetail";
import TBOrderDetailEdit from "./pages/TBOrderDetailEdit";
import Employee from "./utils/common/Employee";
const Stack = StackNavigator({
TBHome: {screen: TBHome},
TBSearch: {screen: TBSearch},
AddTB: {screen: AddTB},
AddDetail: {screen: AddDetail},
PlaceDeparture: {screen: PlaceDeparture},
TBOrderDetail: {screen: TBOrderDetail},
TBOrderDetailEdit: {screen: TBOrderDetailEdit},
Employee: {screen: Employee}
}, {
initialRouteName: "TBHome",
cardStyle: {
backgroundColor: '#FFFFFF',
shadowOpacity: 0,
},
navigationOptions: {
headerTitleStyle: {
fontSize: 17,
color: "#FFFFFF"
},
headerStyle: {
backgroundColor: "rgb(41,40,45)",
height: 44,
// shadowColor: "#A8A8A8",
// shadowOffset: {width: 0, height: 1},
// shadowOpacity: 0.5,
// shadowRadius: 2,
borderBottomWidth: 0,
elevation: 0,
},
},
transitionConfig: () => ({
screenInterpolator: CardStackStyleInterpolator.forHorizontal,
}),
});
export const BottomModal = StackNavigator({
Stack: {screen: Stack},
OperationUnitModal: {screen: OperationUnitModal}
}, {
mode: 'modal',
headerMode: 'none',
transitionConfig: () => ({screenInterpolator: fromBottomLikeAndroid}),
cardStyle: {
backgroundColor: 'rgba(0,0,0,0)',
shadowOpacity: 0,
}
});