微信小程序学习-01-目录及配置

  • pages//对应页面目录
    • index//首页
      • index.js
      • index.wxml
      • index.wxss
    • logs//子页面
      • logs.js
      • logs.json
      • logs.wxml
      • logs.wxss
  • utils//自己封装的工具函数
    • utils.js
  • app.js//全局js
  • app.json//全局配置文件
  • app.wxss//全局样式
  • project.config.json//项目描述

app.json

标签

  • pages
    • 页面路径
  • window
    • 全局默认窗口表现
    • navigationBarTitleText:导航栏页面标题
    • navigationBarBackgroundColor:导航栏背景颜色
    • navigationBarTextStyle:white/black
    • enablePullDownRefresh:是否开启下拉刷新
    • backgroundTextStyle:ligth/dark
  • tabBar
    • list//对应的页面路径即配置
    • color:tab上文字默认颜色
    • selectedColor:tab上文字选中时颜色
    • backgroundColor:tab背景颜色
    • boderStyle:上边框颜色,black/white
    • position:bottom/top
{
  "pages": [
    "pages/index/index",
    "pages/home/home",
    "pages/logs/logs"
  ],
  "window": {
    "backgroundTextStyle": "dark",
    "navigationBarBackgroundColor": "#0094ff",
    "navigationBarTitleText": "火狐",
    "navigationBarTextStyle": "white",
    "enablePullDownRefresh":true
  },
  "sitemapLocation": "sitemap.json",
  "tabBar":{
    "color": "#000",
    "selectedColor":"#f23030",
    "backgroundColor":"#0094ff",
    "list":[
      {
        "pagePath":"pages/index/index",
        "text":"首页",
        "iconPath":"icons/index.jpg",
        "selectedIconPath":"icons/index_active.jpg"
      },
      {
        "pagePath": "pages/home/home",
        "text": "home",
        "iconPath": "icons/home.jpg",
        "selectedIconPath": "icons/home_active.jpg"
      },
      {
        "pagePath": "pages/logs/logs",
        "text": "日志",
        "iconPath": "icons/logs.jpg",
        "selectedIconPath": "icons/logs_active.jpg"
      }
    ]
  }
}

其他请查看微信小程序开发文档

page.json

标签

  • navigationBarTitleText:导航栏页面标题
  • navigationBarBackgroundColor:导航栏背景颜色
  • navigationBarTextStyle:white/black
  • enablePullDownRefresh:是否开启下拉刷新
  • backgroundTextStyle:ligth/dark
{
  "usingComponents": {},
  "backgroundTextStyle": "light",
  "navigationBarBackgroundColor": "#0094ff",
  "navigationBarTitleText": "home",
  "navigationBarTextStyle": "black",
  "enablePullDownRefresh": true
}

其他请查看微信小程序开发文档

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值