小程序:全局配置(pages、windows、tabBar)

1、pages:页面

  "pages": [
    "pages/index/index",
    "pages/logs/logs"
  ],

2、windows:全局的默认窗口表现,用于设置小程序的状态栏、导航条、标题、窗口背景色。

(1)导航栏颜色:

  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#444",
    "navigationBarTitleText": "WeChat",
    "navigationBarTextStyle": "white"
  },

 (2)名称:

  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#444",
    "navigationBarTitleText": "cNode",
    "navigationBarTextStyle": "white"
  },

 (3)下拉刷新:默认为false,设置为true

  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#444",
    "navigationBarTitleText": "cNode",
    "enablePullDownRefresh":true
  },

3、tabBar(https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#window

  "tabBar":{
      "list":[
        {
          "pagePath":"pages/index/index",
          "text":"首页"
        },
        {
          "pagePath":"pages/index/index",
          "text":"入门"
        },
        {
          "pagePath":"pages/index/index",
          "text":"消息"
        },
        {
          "pagePath":"pages/index/index",
          "text":"API"
        },
        {
          "pagePath":"pages/index/index",
          "text":"个人"
        }
      ],
      "color":"#2E2E2E",
      "selectedColor":"#F8B7D2",
      "backgroundColor":"#DEE1E6"
  },

效果:

猜你喜欢

转载自www.cnblogs.com/zhai1997/p/13175963.html