小程序配置项---

1.app.json中配置【全局配置】

1>pages页面配置

"pages": [

    "pages/index/index",    

    "pages/list/list",

    "pages/goods/goods",

    "pages/my/my",

    "pages/logs/logs"

  ],

  • 谁在第一个,则默认显示谁
  • 直接写,不用自己配置,保存时,系统会自动配置创建好文件

2> 窗口样式信息配置

"window": {

    "navigationBarTextStyle": "black",   // 导航栏标题、状态栏颜色,仅支持 black / white【头部文字颜色】

    "navigationBarTitleText": "微信", // 导航栏标题文字内容【标题文字】

    "navigationBarBackgroundColor": "#00ff00", // 导航栏背景颜色 【头部背景颜色】

    "backgroundTextStyle":"light", // 下拉 loading 的样式,仅支持 dark / light【下拉小圆圈样式】

    "enablePullDownRefresh":true, // 是否开启全局的下拉刷新。【想要下拉功能必须写true】

    "backgroundColor":"#0000ff"  //窗口的背景色 【下拉下来的背景颜色】

    "onReachBottomDistance":50 //页面上拉触底事件触发时距页面底部距离,单位为 px。【不用写单位】

  },

3>设置tabBar

"tabBar": {

    "color": "#000000", //tab 上的文字默认颜色,仅支持十六进制颜色【tabBar的文字颜色】

    "selectedColor": "#00ff00",//ab 上的文字选中时的颜色,仅支持十六进制颜色【选中的文字颜色】

    "borderStyle": "black", //tabbar 上边框的颜色, 仅支持 black / white 【tabBar上的那一条线】

    "position": "bottom", //tabBar 的位置,仅支持 bottom / top

    "list": [    /// tab 的列表,最少 2 个、最多 5 个 tab 【tabBar的配置信息】

      {

        "pagePath": "pages/index/index",  // 【path路径】

        "text": "首页",  // 【标题】

        "iconPath": "./images/shouye.png", // 【小图标】

        "selectedIconPath": "./images/shouye2.png"//【选中时的小图标】

      }, {

        "pagePath": "pages/list/list",

        "text": "列表",

        "iconPath": "./images/fenlei.png",

        "selectedIconPath": "./images/fenlei2.png"

      }, {

        "pagePath": "pages/goods/goods",

        "text": "商品",

        "iconPath": "./images/shangpin.png",

        "selectedIconPath": "./images/shangpin2.png"

      }, {

        "pagePath": "pages/my/my",

        "text": "我的",

        "iconPath": "./images/wodedangxuan.png",

        "selectedIconPath": "./images/wodedangxuan2.png"

      }

    ]

  },

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值