页面上的 2 个 DrawerNavigators
2 DrawerNavigators on page
我创建了两个基本的 DrawerNavigators。一个是左边的,一个是顶栏右边的:
const LeftDrawer = DrawerNavigator({
MenuScreen: { screen: MenuScreen }
}, getDrawerConfig(300, 'left', 'MainScreen'));
export default LeftDrawer;
const RightDrawer = DrawerNavigator({
AccountScreen: { screen: AccountScreen }
}, getDrawerConfig(300, 'right', 'MainScreen'));
export default RightDrawer;
是否可以在 MainScreen 视图中使用两个抽屉?
谢谢!
使用一个 DrawerNavigator 作为主导航器并将另一个 DrawerNavigator 嵌套在第一个导航器中应该可以。
const MainDrawer = DrawerNavigator({
OtherDrawer: DrawerNavigator({
AccountScreen: { screen: AccountScreen }
}, getDrawerConfig(300, 'right', 'MainScreen')),
MenuScreen: { screen: MenuScreen }
}, getDrawerConfig(300, 'left', 'MainScreen'));
export default MainDrawer;
我创建了两个基本的 DrawerNavigators。一个是左边的,一个是顶栏右边的:
const LeftDrawer = DrawerNavigator({
MenuScreen: { screen: MenuScreen }
}, getDrawerConfig(300, 'left', 'MainScreen'));
export default LeftDrawer;
const RightDrawer = DrawerNavigator({
AccountScreen: { screen: AccountScreen }
}, getDrawerConfig(300, 'right', 'MainScreen'));
export default RightDrawer;
是否可以在 MainScreen 视图中使用两个抽屉? 谢谢!
使用一个 DrawerNavigator 作为主导航器并将另一个 DrawerNavigator 嵌套在第一个导航器中应该可以。
const MainDrawer = DrawerNavigator({
OtherDrawer: DrawerNavigator({
AccountScreen: { screen: AccountScreen }
}, getDrawerConfig(300, 'right', 'MainScreen')),
MenuScreen: { screen: MenuScreen }
}, getDrawerConfig(300, 'left', 'MainScreen'));
export default MainDrawer;