我正在使用’react-navigation’中的TabNavigator.我想隐藏或删除图标下的文字. 这是TabNavigator的一部分. (我正在使用世博会) Camera: { screen: CameraScreen, }, Noti: { screen: NotificationScreen, }, Menu: { sc
这是TabNavigator的一部分. (我正在使用世博会)
Camera: { screen: CameraScreen, }, Noti: { screen: NotificationScreen, }, Menu: { screen: MenuStackNavigator, }, }, { navigationOptions: ({ navigation }) => ({ header: null, <<< tabBarIcon: ({ focused }) => { ... }, }), header: null, <<<- headerMode: 'none', <<-- tabBarComponent: TabBarBottom, tabBarPosition: 'bottom', animationEnabled: false, swipeEnabled: false, backBehavior: 'none',
这是CamaraScreen
class CameraScreen extends Component { static navigationOptions = { title: 'Camera' }您可以通过为tabBarOptions对象指定showLabel:false来隐藏标签:
backBehavior: 'none', tabBarOptions: { showLabel: false }