页面配置
小于 1 分钟
页面配置
每一个工程页面里面的<config>对本页面的窗口表现进行配置,页面中配置项会覆盖 zmip.config.js 的 window 中相同的配置项,例如:
配置项
用于设置离线包的状态栏、导航条、标题、窗口背景色。
属性 | 类型 | 默认值 | 描述 | 最低版本 |
---|---|---|---|---|
navigationBarBackgroundColor | HexColor | #000000 | 导航栏背景颜色,如#000000 | |
navigationBarTextStyle | string | white | 导航栏标题颜色,仅支持 black/white | |
navigationBarTitleText | string | 导航栏标题文字内容 | ||
navigationStyle | string | default | 导航栏样式,仅支持以下值:default 默认样式 custom 自定义导航栏,只留右上角胶囊按钮 back 允许小程序容器内 H5 页面返回按钮逐级返回 | |
backgroundColor | HexColor | #ffffff | 窗口的背景色 |
示例代码
<config type='json'>
{
"navigationBarTitleText": "小程序",
"navigationStyle": "custom"
}
<config>