小程序全局配置文件 app.json
{
// 可以使用的页面路径配置
"pages":[
"pages/index/index",
"pages/logs/logs"
],
"window":{
"backgroundTextStyle":"dark", //
"navigationBarBackgroundColor": "#000", // 顶部背景颜色
"navigationBarTitleText": "我的微信", // 顶部标题内容
"navigationBarTextStyle":"white", // 顶部文字颜色
"enablePullDownRefresh": true, // 开启下拉刷新
"backgroundColor": "#ddd" // 下拉背景颜色
},
"style": "v2",
// 小程序是否允许站内搜索
"sitemapLocation": "sitemap.json"
// 底部导航栏
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/images/icon_1.png",
"selectedIconPath": "/images/icon_11.png"
},
{
"pagePath": "pages/logs/logs",
"text": "日志",
"iconPath": "/images/icon_2.png",
"selectedIconPath": "/images/icon_22.png"
}
]
}
}
点击导航即可跳转到对应页面。
"window":{
"backgroundTextStyle":"dark", //
"navigationBarBackgroundColor": "#000", // 顶部背景颜色
"navigationBarTitleText": "我的微信", // 顶部标题内容
"navigationBarTextStyle":"white", // 顶部文字颜色
"enablePullDownRefresh": true, // 开启下拉刷新
"backgroundColor": "#ddd" // 下拉背景颜色
},
单个页面中存在, 目录名.json 文件, 可以配置单个页面的信息
// logs.json
// 修改顶部标题名称
{
"navigationBarTitleText": "查看启动日志",
"usingComponents": {}
}