可以将globalStyle中的"transparentTitle"改成always和none分别测试,就能看到区别了
- 发布:2025-11-04 15:45
- 更新:2025-11-04 15:47
- 阅读:29
产品分类: uniapp/小程序/阿里
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: windows11
第三方开发者工具版本号: 3.9.92
基础库版本号: 2.10.1
项目创建方式: CLI
CLI版本号: 5.0.8
操作步骤:
预期结果:
除pages/webview/WebView页面不透明外,其他页面透明
除pages/webview/WebView页面不透明外,其他页面透明
实际结果:
pages中设置的transparentTitle不生效
pages中设置的transparentTitle不生效
bug描述:
pages.json中
{
"pages": [
{
"path": "pages/webview/WebView",
"style": {
"navigationBarTitleText": "",
"navigationBarTextStyle": "white",
"mp-alipay": {
"transparentTitle": "none"
}
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F8F8F8",
"navigationStyle": "custom",
"app-plus": {
"titleNView": false
},
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
},
"fontFamily": "PingFang SC, Helvetica Neue, Arial, sans-serif"
}
}
pages具体页面中配置的 "transparentTitle": "none"未能覆盖掉globalStyle中的相同配置项
1 个回复
DCloud_UNI_JBB
pages中的内容是生成在组件生成的json文件中的,globalStyle是全局的