123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- 'use strict'
- import React, { Component } from 'react'
- import { Platform } from 'react-native'
- import { createStackNavigator } from 'react-navigation'
- import DesktopHome from './Home'
- import SearchHome from './Search'
- import DeliverHome from './Deliver'
- import DeliverAdd from './DeliverAdd'
- import SearchDistributor from './SearchDistributor'
- import UHFDeliver from './UHFDeliver'
- const TITLE_OFFSET = Platform.OS === 'ios' ? 70 : 56;
- const HomeStack = createStackNavigator({
- DesktopHome: {
- screen: DesktopHome,
- navigationOptions: {
- title: '电金睛'
- },
- },
- SearchHome: {
- screen: SearchHome,
- navigationOptions: {
- title: '窜货查询'
- },
- },
- DeliverHome: {
- screen: DeliverHome,
- navigationOptions: {
- title: '出库'
- },
- },
- DeliverAdd: {
- screen: DeliverAdd,
- navigationOptions: {
- title: '批量添加'
- },
- },
- ReturnHome: {
- screen: DeliverHome,
- navigationOptions: {
- title: '退货'
- },
- },
- SearchDistributor: {
- screen: SearchDistributor,
- navigationOptions: {
- title: '查询经销商'
- },
- },
- UHFDeliver: {
- screen: UHFDeliver,
- navigationOptions: {
- title: '射频出库'
- },
- },
- UHFReturn: {
- screen: UHFDeliver,
- navigationOptions: {
- title: '射频退货'
- },
- },
- },
- {
- defaultNavigationOptions: {
- headerStyle: {
- backgroundColor: "#5394e4",
- borderBottomWidth: 0,
- borderColor: '#ccc',
- fontColor: '#fff',
- elevation: 0,
- height: 50
- },
- headerTintColor: '#ffffff',
- headerTitleStyle: {
- fontWeight: 'normal',
- fontSize: 18,
- color: '#ffffff',
- alignSelf:'center',
- textAlign: 'center',
- flex:1
- },
- headerTitleContainerStyle:{
- left: TITLE_OFFSET,
- right: TITLE_OFFSET,
- },
- headerBackTitle: null // ~注意~ 这个地方是隐藏返回按钮文字的
- }
- })
- HomeStack.navigationOptions = ({ navigation }) => { // ~注意~ 如果想实现隐藏Tabbar的功能要调用这个方法
- let tabBarVisible = true
- if (navigation.state.index > 0) {
- tabBarVisible = false
- }
- return {
- tabBarVisible
- }
- }
- module.exports = HomeStack
|