tabBarShowLabel: false
属性来试图隐藏它,但是尽管重新启动应用程序以应用更改,但它仍行不通。还有其他方法吗?
export default function TabsLayout() {
return (
<Tabs screenOptions={{ tabBarActiveTintColor: "#404ae3" }}>
<Tabs.Screen
name="home/index"
options={{
title: "Home",
tabBarIcon: ({ color }) => <FontAwesome name="home" size={28} color={color} />,
}}
/>
<Tabs.Screen
name="tests/index"
options={{
title: "Tests",
tabBarIcon: ({ color }) => <FontAwesome name="pencil" size={28} color={color} />,
}}
/>
<Tabs.Screen
name="settings/index"
options={{
title: "Settings",
tabBarIcon: ({ color }) => <FontAwesome name="cog" size={28} color={color} />,
}}
/>
<Tabs.Screen name="home/course/[id]" options={{ tabBarShowLabel: false }} />
</Tabs>
);
}
<Tabs.Screen
name="news"
options={{
href: null
}}
/>