Home >WeChat Applet >Mini Program Development >WeChat Mini Program Development: Detailed Configuration
1. Global configuration
2. Back to the topic, the app.json file is used to globally configure the WeChat applet, determine the path of the page file, window performance, set network timeout, set multiple tabs, etc. In the introduction of the previous article, I also gave a brief introduction to the app.json file, and then I just read the official document, which introduced it in detail:
3. Although The official has a detailed analysis, and it is also difficult. I originally wanted to be lazy and just read the official documents, but finally decided to do it all. After all, practice is the only way to verify the truth.
Follow the documentation
5.tabBar
If our applet is a For multi-tab applications (there is a tab bar at the bottom of the client window to switch pages), we can use the tabBar configuration item to specify the performance of the tab bar and the corresponding page displayed when the tab is switched. tabBar is an array, and only a minimum of 2 and a maximum of 5 tabs can be configured. The tabs are sorted in the order of the array.
##app.json{ "pages": [ "pages/index/index", "pages/logs/logs" ], "window": { "backgroundTextStyle": "dark ", "navigationBarBackgroundColor": "#ddd", "navigationBarTitleText": "配置测试DEMO", "navigationBarTextStyle": "black", "backgroundColor": "#ff0000" }, "tabBar": { "color": "#000000", "borderStyle": "black", "selectedColor": "#9999FF", "list": [ { "pagePath": "pages/index/index", "text": "首页", "iconPath": "image/location_normal.png", "selectedIconPath": "image/location_selected.png" }, { "pagePath": "pages/logs/logs", "text": "设置", "iconPath": "image/setting_normal.png", "selectedIconPath": "image/setting_selecred.png" } ] } }