uniapp 真机测试底部导航栏文字不显示问题如何解决?-灵析社区

喵酱魔法师

我正在使用uniapp编写app,真机测试时底部导航栏设置的文字没有显示,但是在浏览器上是正常的。 { "pages": [ { "path": "pages/index/home", "style": { "navigationBarTitleText": "首页" } }, { "path": "pages/index/welcomepage", "style": { "navigationBarTitleText": "欢迎界面" } }, { "path": "pages/index/toolbar", "style": { "navigationBarTitleText": "工作台" } }, { "path": "pages/index/my", "style": { "navigationBarTitleText": "我的" } }, { "path": "pages/testview/inner2page", "style": { "navigationBarTitleText": "二级界面" } } ], "globalStyle": { "navigationBarTextStyle": "#000000", "navigationBarBackgroundColor": "#ff4000", "backgroundColor": "#ff4000" }, "tabBar":{ "selectedColor":"#ff4000", "color":"#ff4000", "list":[ { "pagePath":"pages/index/home", "text":"首页", "iconPath":"/static/home.png", "selectedIconPath":"/static/home2.png" }, { "pagePath":"pages/index/toolbar", "text":"工作台", "iconPath":"/static/toolbar.png", "selectedIconPath":"/static/toolbar2.png" }, { "pagePath":"pages/index/my", "text":"我的", "iconPath":"/static/my.png", "selectedIconPath":"/static/my2.png" } ] } } 浏览器效果: ![图片.png](https://wmlx-new-image.oss-cn-shanghai.aliyuncs.com/images/20250121/5b840429f80744c558f5b70e6bfd6f8c.png) 真机效果: ![图片.png](https://wmlx-new-image.oss-cn-shanghai.aliyuncs.com/images/20250121/8e45054145cc4e1480c6638472a7e2e4.png)

阅读量:339

点赞量:9

问AI
设置一下 "tabbar" 的 "backgroundColor" 和 "fontSize" 之后再看看? "tabBar":{ "fontSize":"10px", "color":"#ff4000", "selectedColor":"#ff4000", "backgroundColor":"#f8f8f8", "list":[ { "pagePath":"pages/index/home", "text":"首页", "iconPath":"/static/home.png", "selectedIconPath":"/static/home2.png" }, { "pagePath":"pages/index/toolbar", "text":"工作台", "iconPath":"/static/toolbar.png", "selectedIconPath":"/static/toolbar2.png" }, { "pagePath":"pages/index/my", "text":"我的", "iconPath":"/static/my.png", "selectedIconPath":"/static/my2.png" } ] }