1. 小程序顶部导航栏的默认设置
//全局设置
"window": {
    "navigationBarBackgroundColor": "#ffffff",
    "navigationBarTitleText": "111111",
    "navigationBarTextStyle": "black",
     "backgroundColor": "#eeeeee",
    "backgroundTextStyle": "light"
  },

navigationBarBackgroundColor指导航栏背景颜色;
navigationBarTextStyle指导航栏标题颜色,值为black / white;;
navigationBarTitleText指导航栏标题文字内容;
backgroundTextStyle指下拉 loading 的样式,值为dark / light
backgroundColor指下拉背景的颜色;

  1. 自定义顶部导航栏 navigationStyle
//全局设置
"window": {
   "navigationStyle": "custom",
    "backgroundTextStyle": "dark",
    "navigationBarBackgroundColor": "#2ea7e0",
    "navigationBarTitleText": "11111",
    "navigationBarTextStyle": "white",
    "onReachBottomDistance": 30
  },

navigationStyle指导航栏样式,值为default/custom,default 默认样式
custom 自定义导航栏,只保留右上角胶囊
onReachBottomDistance指页面上拉触底事件触发时距页面底部距离,单位为px;

  1. 设置单页面顶部栏样式(需要在单页面的json里边进行配置)
{
  "navigationBarBackgroundColor": "#ffffff",
  "navigationBarTextStyle": "black",
  "usingComponents": {}
}
Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐