12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 'use strict';
- import {createStackNavigator} from 'react-navigation-stack';
- import NavigationOptions from '../../components/NavbarOptions';
- import SalesHome from './Home';
- import ReportCustomerList from './ReportCustomerList';
- import ReportCustomerAdd from './ReportCustomerAdd';
- import SearchProject from './SearchProject';
- const HomeStack = createStackNavigator({
- SalesHome: {
- screen: SalesHome,
- navigationOptions: {
- title: '首页',
- },
- },
- ReportCustomerList: {
- screen: ReportCustomerList,
- navigationOptions: {
- title: '客户报备',
- },
- },
- ReportCustomerAdd: {
- screen: ReportCustomerAdd,
- navigationOptions: {
- title: '报备客户',
- },
- },
- SearchProject: {
- screen: SearchProject,
- navigationOptions: {
- title: '选择项目',
- },
- },
- },
- {
- initialRouteName: 'SalesHome',
- defaultNavigationOptions: NavigationOptions,
- //mode: 'modal',
- //headerMode: 'none',
- },
- );
- HomeStack.navigationOptions = ({navigation}) => { // ~注意~ 如果想实现隐藏Tabbar的功能要调用这个方法
- let tabBarVisible = true;
- if (navigation.state.index > 0) {
- tabBarVisible = false;
- }
- return {
- tabBarVisible,
- };
- };
- module.exports = HomeStack;
|