reactjs - 侧边菜单反应原生
问题描述
所以基本上我在 react native 中使用导航。我在主标题的每一侧都有两个图标,我想为两者创建抽屉,但似乎你不能使用 openDrawer() 打开一个特定的抽屉。除了导航抽屉之外,还有其他替代方法可以使用 expo 创建侧边菜单吗?
export const CategoriesDrawerNavigation = () => (
<Drawer.Navigator initialRouteName='all' drawerContentOptions={{
activeBackgroundColor: Colors.selectedColor,
activeTintColor: 'black'
}}>
<Drawer.Screen name='all' component={ProductStackNavigation}/>
{CategoriesList.map((item, i) =>(
<Drawer.Screen name={item} key={i} component={ProductCategoriesStackNavigation}/>
))}
</Drawer.Navigator>
)
export const FilterDrawerNavigation = () => (
<Drawer.Navigator initialRouteName='all' drawerContentOptions={{
activeBackgroundColor: Colors.selectedColor,
activeTintColor: 'black'
}}>
<Drawer.Screen name='filters' component={ProductStackNavigation} options={{
title: ''
}}/>
</Drawer.Navigator>
)
解决方案
推荐阅读
- amazon-web-services - 如何准确找出 SWF 工作流在等待哪个 Promise?
- pickle - 是否有一种方法可以在 tidymodels 中序列化机器学习模型(类似于在 Python 中腌制模型)?
- react-native - React Native - 设置secureTextEntry时无法更改字体
- java - 我的链接列表中的删除功能不起作用
- javascript - jQuery基于长度显示/隐藏内容,多个内部html标签问题
- numpy - matlibplot 基于矩阵的绘图线
- c++ - 如何在 C++ 中将元素推送到数组中?
- ios - 在 Swift 中将视频保存在本地(目录)中?
- google-colaboratory - 找不到任何名为“fabfile”的集合
- python - Mypy 产生不兼容的签名错误但满足 Liskov 替换原则