美文网首页
微信小程序JSON配置

微信小程序JSON配置

作者: Poiey | 来源:发表于2020-02-02 20:45 被阅读0次

全局配置 ( app.json )

  • 配置页面文件
  • 配置navigationBar样式
  • 配置tabBar
 {
  "pages": [
    "pages/index/index",
    "pages/center/index",
    "pages/add/index"
  ],
  "window": {
    "backgroundColor": "#F6F6F6",
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#F6F6F6",
    "navigationBarTextStyle": "black"
  },
  "tabBar": {
    "color": "#000000",
    "selectedColor": "#d81e06",
    "list": [
      {
        "selectedIconPath": "/images/home-active.png",
        "iconPath": "/images/home.png",
        "pagePath": "pages/index/index",
        "text": "精选"
      },
      {
        "selectedIconPath": "/images/add-active.png",
        "iconPath": "/images/add.png",
        "pagePath": "pages/add/index",
        "text": "增加"
      },
      {
        "selectedIconPath": "/images/center-active.png",
        "iconPath": "/images/center.png",
        "pagePath": "pages/center/index",
        "text": "我的"
      }
    ]
  },
  "sitemapLocation": "sitemap.json",
  "style": "v2"
}

页面配置 ( index.json )

  • 配置UI组件
  • 配置单个navigationBar页面
{
  "usingComponents": {
   
  },
  "navigationBarBackgroundColor": "#ffffff",
  "navigationBarTextStyle": "black",
  "navigationStyle": "custom",
// "navigationBarTitleText": "新增",
  "backgroundColor": "#eeeeee",
  "backgroundTextStyle": "light"
}

详细配置参考微信小程序官方文档https://developers.weixin.qq.com/miniprogram/dev/framework/

相关文章

网友评论

      本文标题:微信小程序JSON配置

      本文链接:https://www.haomeiwen.com/subject/qjtcxhtx.html