【发布时间】:2020-02-21 17:44:58
【问题描述】:
嘿,我正在使用 React Native 项目,我正在使用 React Router Flux 进行导航,我使用 Drawer,那么如何在某些屏幕中禁用抽屉?喜欢登录屏幕?
我尝试了 drawerLockMode={'lock-closed'} 但它不起作用
这是我的代码
<RouterRedux backAndroidHandler={() => {}}>
<Drawer>
<Scene key="root" hideNavBar transitionConfig={transitionConfig}>
<Scene key="Tuto" component={Tuto} type={ActionConst.RESET} />
<Scene
initial
key="CheckAuth"
component={CheckAuth}
type={ActionConst.RESET}
/>
<Scene key="SignIn" component={SignIn} />
<Scene key="ResetPassword" component={ResetPassword} />
<Scene key="Visits" component={Visits} />
<Scene key="VisitDetails" component={VisitDetails} />
<Scene key="Statistiques" component={Statistiques} />
</Scene>
</Drawer>
</RouterRedux>
【问题讨论】:
-
您是否尝试将
drawerLockMode传递给每个单独的场景? -
是的,我试过了,但没用
-
你能展示一下你到目前为止所做的尝试并把它放在上面的代码中吗?我的意思是通过
lock-closed用于禁用场景,unlocked用于启用场景。
标签: react-native react-native-router-flux