Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

首页以及带有tab的页面设置header均无效 #78

Open
MinionsCoding opened this issue Mar 20, 2019 · 1 comment
Open

首页以及带有tab的页面设置header均无效 #78

MinionsCoding opened this issue Mar 20, 2019 · 1 comment

Comments

@MinionsCoding
Copy link

MinionsCoding commented Mar 20, 2019

在navigationOptions中,不管是设置header: null,还是设置headerTitle: 'myTitle',或者设置title: 'myTitle',都不能修改header。

版本:
"dependencies": {
"dva-core": "^1.3.0",
"react": "16.6.3",
"react-native": "0.57.8",
"react-navigation": "^2.5.1",
"react-navigation-redux-helpers": "^2.0.2",
"react-redux": "^5.0.7"
},

@lokiiart
Copy link

在component中设置navigationOptions的title或者headerTitle只对stackNavigator有效。BottomTabNavigator的headerTitle要另外想办法。我现在的解决办法是简单的把底部导航的key直接改成中文标题。比如
'Account': { screen: Account },
改成
'账号': { screen: Account },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants