1. 问题如下
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/3405786d2d494b3b837f3cbf0ba77c5c.png)
2. 代码
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/c4efdcf36ae944e2bd7d0db11b3432c6.png)
3. 问题描述
是 HBuilderX(3,99) 的缺陷,在 page.json 中进行相关配置时会自动生成两条页面配置样式
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/b7073eb34b2d4d9fb1a057bf105daae2.png)
其中 navigationBarTitleText 默认为空,所以在 globalStyle 中配置会被覆盖,即 globalStyle 中 navigationBarTitleText 并不会生效
4. 解决方案:删除或注释上述代码
如:
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/f0ad5c6f9c264901a92a17f40444887e.png)
保存后生效(如果在微信开发者工具中不生效重新编译一下)
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/5636c887833a438ebbf0b6a83e4b2479.png)
5. 其他原因
也可能是其他原因,如:
- 没把页面放在 pages.json 中 pages 中