Javascript 底部选项卡导航器背景图像

Javascript 底部选项卡导航器背景图像,javascript,react-native,react-navigation,Javascript,React Native,React Navigation,Im使用React导航3。目前我的项目中有一个bottomTabNavigator。我想为它设置一个背景图像或艺术。我的标题非常直接,因为我使用了一个名为headerBackground的属性,我向它传递了一个react组件,它可以工作,但bottomTab不是这样 我设法通过使用tabBarComponent使它以某种方式工作,因此图像渲染正常,但问题是我的选项卡消失了 是否有合适的方法将背景图像设置为tabNavigator 这是我当前的tabNavigatorcode: 从“React”

Im使用
React导航3
。目前我的项目中有一个
bottomTabNavigator
。我想为它设置一个背景图像或艺术。我的标题非常直接,因为我使用了一个名为
headerBackground
的属性,我向它传递了一个react组件,它可以工作,但bottomTab不是这样

我设法通过使用
tabBarComponent
使它以某种方式工作,因此图像渲染正常,但问题是我的选项卡消失了

是否有合适的方法将背景图像设置为
tabNavigator

这是我当前的
tabNavigator
code:

从“React”导入React;
从“react navigation”导入{CreateBoottomTabNavigator,createAppContainer};
从“./组件/配置文件”导入配置文件;
从“react native”导入{Image,View};
const Tab=createBottomTabNavigator(
{
简介:{
屏幕:配置文件,
导航选项:{
标题:"家",,
tabBarIcon:({tintColor})=>(
)
}
},
党派:{
屏幕:配置文件,
导航选项:{
标题:"家",,
tabBarIcon:({tintColor})=>(
)
}
},
格鲁波斯:{
屏幕:配置文件,
导航选项:{
标题:"家",,
tabBarIcon:({tintColor})=>(
)
}
},
预订:{
屏幕:配置文件,
导航选项:{
标题:"家",,
tabBarIcon:({tintColor})=>(
)
}
}
},
{
选项卡选项:{
风格:{
背景颜色:“#c2b464”,
},
showLabel:错误
},
tabBarComponent:props=>{
返回(
);
}
}
);
导出默认createAppContainer(选项卡)
tabBarComponent:props=>
只需制作组件并在中创建图标或文本,然后进行渲染。 在component下,u可以通过
this.props.navigation.navigate('desirescreen-route')导航到其他屏幕

tabBarComponent:props=>
只需制作组件并在中创建图标或文本,然后进行渲染。 在component下,u可以通过
this.props.navigation.navigate('desirescreen-route')导航到其他屏幕

tabBarComponent: props =><BottomNavigator {...props}/>