即使不存在特定屏幕的标签,如何在所有屏幕上显示底部标签菜单?
const tabNavigator = createBottomTabNavigator(
{
MainStack,
HistoryStack,
}
}
);
export default createAppContainer(
createSwitchNavigator({
Main: tabNavigator,
Test:Test,
Test1: Test1
},
{
initialRouteName: 'Test',
})
);
目前Test1,“测试”屏幕没有显示选项卡
答案 0 :(得分:1)
在选项卡导航器堆栈中添加测试屏幕。当前,测试屏幕在开关导航器中是单独的。
function addNums(n1: number, n2: number, n3: number): void
{
let sum = n1 + n2 + n3;
alert(sum);
}
let alsoAddNums : (one: number, two: number, three: number) => void = addNums