скрыть ящик на заданном экране c - PullRequest
0 голосов
/ 26 февраля 2020

Привет, я работаю с собственным реактивным проектом, использующим React Router Flux для навигации, все в порядке, за исключением того, что я хочу скрыть ящик от экрана входа и экрана. Вот мой код ниже

const RouterRedux = connect()(Router);

<RouterRedux backAndroidHandler={() => {}}>
      <Drawer
        hideNavBar
        open={false}
        key="drawer"
        contentComponent={SideBar}
        drawerWidth={300}
        // drawerLockMode={show ? 'locked-closed' : 'unlocked'}>
      >
        <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="WIP" component={WorkInProgress} />*/}
          <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 key="Notification" component={Notification} />
          <Scene key="Sync" component={Sync} />
        </Scene>
      </Drawer>
    </RouterRedux>

так как я могу спрятать ящик от экрана входа и экрана Tuto?

1 Ответ

0 голосов
/ 13 апреля 2020

Я нашел способ заблокировать ящик, и внесение некоторых изменений работает с вашей переменной show lock / unlock. Вам нужно разделить группу сцен с заблокированным ящиком и другой (разблокированной), что-то в этом роде ...

<RouterRedux backAndroidHandler={() => { }}>
    <Drawer
        hideNavBar
        open={false}
        key="drawer"
        contentComponent={SideBar}
        drawerWidth={300}
    // drawerLockMode={show ? 'locked-closed' : 'unlocked'}>
    >
        <Scene
            key="root" hideNavBar
            transitionConfig={transitionConfig}
            drawerLockMode='locked-closed'
        >
            <Scene key="Tuto" component={Tuto} type={ActionConst.RESET} />
            <Scene
                initial
                key="CheckAuth"
                component={CheckAuth}
                type={ActionConst.RESET}
            />
        </Scene>
        <Scene
            key="root2"
            hideNavBar
            transitionConfig={transitionConfig}
            drawerLockMode='unlocked'
        >
            {/*<Scene key="WIP" component={WorkInProgress} />*/}
            <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 key="Notification" component={Notification} />
            <Scene key="Sync" component={Sync} />
        </Scene>
    </Drawer>
</RouterRedux>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...