想要进行全局配置在根部的app文件里
app.json ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
//配置相关页,相当于配置路由//有两种方法: 1.在pages文件里面创建相关文件夹,在文件夹上点击右键选择新建pages就可以快速创建并且讲相关以下代码引入进来// 2.直接在此文件(app.json)里面写相关以下代码即可快速创建文件夹(推荐此方法){"pages": ["pages/api/api","pages/index/index","pages/logs/logs","pages/base/base","pages/dy/dy","pages/dyDetail/dyDetail"],//配置顶部样式"window": {"backgroundTextStyle": "light",//设置头部颜色 只支持16进制的颜色代码"navigationBarBackgroundColor": "#fff",//设置标题"navigationBarTitleText": "weixin",//设置标题颜色"navigationBarTextStyle": "black"},//设置的是下方点击的路由 ,一个对象代表一页"tabBar": {"color": "#ccc","selectedColor": "#1296db","backgroundColor": "","position": "bottom","list": [{//路由的路径"pagePath": "pages/api/api",//标题"text": "api",//照片默认"iconPath": "public/api-fill (1).png",//照片点击后的"selectedIconPath": "public/api-fill.png"},{"pagePath": "pages/dy/dy","text": "斗鱼","iconPath": "public/net (1).png","selectedIconPath": "public/net-s.png"}]},"style": "v2","sitemapLocation": "sitemap.json"}
如果觉得《微信小程序全局配置》对你有帮助,请点赞、收藏,并留下你的观点哦!