Syd*_*ria 2 react-native react-native-navigation wix-react-native-navigation react-native-navigation-v2
我有TabBar基础应用程序,在我的一个标签中我需要将其推送到另一个屏幕,但标签栏不应显示在推动的屏幕中.但是底部栏仍然存在于推动的屏幕中.我想要实现的并不是完全隐藏底部标签栏,而是将推动的屏幕放在标签栏的顶部.
这是我显示标签栏应用程序的代码:
bottomTabs: {
id: 'BottomTabsId',
children: [
{
stack: {
children: [
{
component: {
name: 'Home',
options: {
topBar: {
backButton: {
title: 'Back',
},
title: {
text: 'Home'
}
},
bottomTab: {
fontSize: 12,
text: 'Home',
icon: require('./src/assets/home.png'),
selectedIcon: require('./src/assets/home_active.png')
},
},
},
}
]
}
},
{
stack: {
children: [
{
component: {
name: 'Booking',
options: {
topBar: {
title: {
text: 'Booking'
}
},
bottomTab: {
text: 'Booking',
fontSize: 12,
icon: require('./src/assets/booking.png'),
selectedIcon: require('./src/assets/booking_active.png')
}
}
},
}
],
},
},
],
},
标签栏仍然存在:(

我想要实现的是这个

您需要使用以下bottomTabs.visible: false选项推送该屏幕:
Navigation.push(this.props.componentId, {
component: {
name: 'your.component.name',
options: {
bottomTabs: {
visible: false,
drawBehind: true
}
}
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2877 次 |
| 最近记录: |