1***@qq.com
1***@qq.com
  • 发布:2025-09-03 18:17
  • 更新:2025-09-03 19:25
  • 阅读:13

状态栏navigationBarTextStyle 设置为 black 无效,运行到安卓和ios 都是白色的

分类:uni-app

{
"easycom": {
"autoscan": true,
"custom": {
"^u-(.)": "uview-ui/components/u-$1/u-$1.vue",
"^w-(.
)": "@/uni_modules/wmf-code/components/w-$1/w-$1.vue"
}
},
"globalStyle": {
"dynamicRpx": true,
"navigationBarBackgroundColor": "#000000",
"navigationBarTitleText": "Centrdx",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false,
"pullToRefresh": {
"className": "uni-pull-to-refresh"
},
"h5": {
"meta": {
"apple-mobile-web-app-status-bar-style": "black-translucent"
}
},
"app-plus": {
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
"pages": [
// 首页
{
"path": "pages/home/index",
"style": {
"navigationStyle": "custom",
"defaultTitle": "",
"h5": {
"meta": {
"apple-mobile-web-app-status-bar-style": "black-translucent"
}
}
}
],
"condition": {
"current": 0,
"list": [
{
"name": "",
"path": "pages/home/index",
"query": ""
}
]
},
"app-plus": {
"animationType": "slide-in-right",
"animationDuration": 300,
"softinputMode": "adjustResize",
"safearea": {
"bottomOffset": 0
}
}
}

设置的 navigationBarTextStyle 无效,请问还有什么什么其他的地方会影响状态栏的字体颜色,也没有使用 uni.setNavigationBarColor进行动态操作,目前情况进去是黑色的然后闪一下就成白色的了

2025-09-03 18:17 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

你好,使用哪个版本的hbuilderx ? 可否提供一下图片效果,或者新建一个项目看一下能否复现

要回复问题请先登录注册