微信小程序 (一)app.json

app.json

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

json中的字段pages是我们的页面,需要创建页面需要在这里注册,我们在这里定义好页面后,编译器,也会自动生成需要的文件 例:【xxx.js】【xxx.wxml】【xxx.wxss】【xxx.json】

下面是属性Window

  "window":{
    "backgroundTextStyle":"light",
    "navigationBarBackgroundColor": "#fff",
    "navigationBarTitleText": "Weixin",
    "navigationBarTextStyle":"black"
  }
属性 类型 默认值 描述
navigationBarBackgroundColor HexColor #000000 导航栏背景颜色,如"#000000"
navigationBarTextStyle String white 导航栏标题颜色,仅支持black/white
navigationBarTitleText String

null

导航栏标题文字内容
backgroundColor HexColor #ffffff 窗口的背景色
backgroundlextStyle String dark 下拉背景字体、loading图的样式,仅支持 dark/light
enablePulIDownRefresh Boolean false 是否开启下拉刷新
onReachBottomDistance Number 50 页面上拉触底事件触发事件距页面底部距离,单位px

APP.jason其他配置项列表
 

属性 类型 必填 描述
pages StringArray 设置页面路径
windows Object 设置默认页面的窗☐ 表现
tabar Object 设置底部tab的表现 
networkTimeout Object 设置网络超时时间
debug Boolean 设置是否开启 debug 模式

猜你喜欢

转载自blog.csdn.net/yuhui77268769/article/details/113725510