上一篇文章咱们介绍了App.json全局配置,如果我们不想全局使用,只想在单独页面配置怎么办???
小程序为我们提供了页面.json的页面配置文件
每一个小程序页面也可以使用.json文件来对本页面的窗口表现进行配置。
注:
(1)页面的配置只能设置 app.json 中部分 window 配置项的内容
(2)页面中配置项会覆盖 app.json 的 window 中相同的配置项。
(3)如果页面没有配置键值对,则需要{}
来填补空白
例如
{
"navigationBarBackgroundColor": "#000000", //导航栏背景颜色
"navigationBarTextStyle":"white", //导航栏标题颜色,仅支持 black / white
"navigationBarTitleText": "导航条标题", //导航栏标题文字内容
"navigationStyle":"default", //导航栏样式,default 默认样式 custom 自定义导航栏
"backgroundColor":"grey",