如果导入了页面,为什么在Drawer Navigator中看不到其他页面?

时间:2019-05-01 15:23:04

标签: react-native react-navigation

如果导入了其他页面,我在抽屉中看不到它们。我唯一看到的页面是第一页。因此,我将其放在第一位置时,可以在屏幕上看到它,但是其他位置,就像它们未导入一样。

  

反应导航V3

这是我的抽屉导航器代码:

import React, {Component} from 'react';
import { Dimensions } from 'react-native';
import { createStackNavigator, createAppContainer, createDrawerNavigator } from 'react-navigation'; 
import DrawerClose from './DrawerCloseButton'
import DrawerOpen from './DrawerOpenButton'

import HomeScreen from './HomeScreen';
import Count from './Counting';


const WIDTF = Dimensions.get('window').width;

const DrawerConfig = {
  drawerWidth: WIDTF*0.80,
  drawertType: 'back'    
}

const Drawer = createDrawerNavigator ({
Home: {
  screen: DrawerOpen,
},
Count: {
  screen: Count,
},
},
{
contentComponent: DrawerClose, 
contentOptions: {
  activeTintColor: 'green',
  style: {
    flex: 1,
    paddingTop: 15,
  }
}},
DrawerConfig
);

const AppContainer = createAppContainer(Drawer);

export default AppContainer;

这是我的意思:

enter image description here

0 个答案:

没有答案