小编Far*_*ooq的帖子

React navigation 5 - 从左向右移动抽屉项目图标

我想在左侧显示标签,在右侧显示抽屉图标,但不知道如何操作。这是代码

<Drawer.Navigator
      drawerContentOptions={{
        contentContainerStyle: {
          backgroundColor: Colors.primary,
          height: "100%"
        },
        labelStyle: { color: "white" }
      }}
    >
      <Drawer.Screen
        name="HomeScreen"
        component={Home}
        options={{ drawerLabel: "Home" }}
      />
      <Drawer.Screen
        name="Channels"
        component={Channels}
        options={{
          drawerIcon: () => (
            <AntDesign
              name="pluscircle"
              size={20}
              color="white"
            />
          )
        }}
      />
    </Drawer.Navigator>
Run Code Online (Sandbox Code Playgroud)

我想在左侧显示“频道”,在右侧显示加号图标

react-native react-navigation react-navigation-drawer

5
推荐指数
1
解决办法
6222
查看次数