forked from Betterhub/vuebi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
113 lines (100 loc) · 2.04 KB
/
App.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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import React from 'react';
import { StyleSheet } from 'react-native';
// 3rd party libraries
import {
Actions,
Router,
Scene,
// Reducer,
Tabs,
Stack,
} from 'react-native-router-flux';
import { Icon } from 'antd-mobile-rn';
// Views
import {
FabiView,
BiBiView,
OrderView,
SettingsView,
} from './src/pages';
// components
import {
TabIcon
} from './src/components';
// @todo remove when RN upstream is fixed
console.ignoredYellowBox = [
'Warning: In next release empty section headers will be rendered.',
'Warning: setState(...): Can only update a mounted or mounting component.',
];
const styles = StyleSheet.create({
tabBarStyle: {
backgroundColor: '#eee',
height: 49,
},
});
const scenes = Actions.create(
<Stack
hideNavBar
headerMode="screen"
key="root"
>
<Tabs
key='tabbar'
tabBarStyle={styles.tabBarStyle}
wrap={true}
showLabel={false}
swipeEnabled={false}
// headerMode='screen'
icon={TabIcon}
lazy={true}
tabBarPosition={'bottom'}
activeBackgroundColor='white'
inactiveBackgroundColor='white'
activeTintColor='#4ECBFC'
inactiveTintColor='#aaa'
>
<Stack
key='bibi'
title='币币交易'
>
<Scene
key='bibi_key'
component={BiBiView}
icon={() => <Icon type="check" size="md" color="red" />}
/>
</Stack>
<Stack
key='fabi'
title='法币交易'
>
<Scene
key='fabi_key'
component={FabiView}
/>
</Stack>
<Stack
key='order'
title='订单'
>
<Scene
key='order_key'
component={OrderView}
/>
</Stack>
<Stack
key='settings'
title='个人'
>
<Scene
key='settings_key'
component={SettingsView}
/>
</Stack>
</Tabs>
</Stack>
);
export default class Periods extends React.Component {
render() {
return <Router scenes={scenes} />;
}
}