In-depth analysis of global configuration in mini programs
This article will talk about the global configuration in the mini program, and learn about the common configuration items and page configuration files in the mini program. I hope it will be helpful to you!
Global configuration file and commonly used configuration items
app.json
in the root directory of the mini program The file is the global configuration file of the applet. Commonly used configurations are as follows:
-
pages
: Record the storage path of all pages of the current mini program -
window
: Globally set the mini program window Appearance -
tabBar
: Set thetabBar
effect at the bottom of the mini program -
style
: Whether to enable the new version of the component style [ Related learning recommendations: 小program development tutorial】
window
Components of the small program window
window Common configuration items
Property name | Type | Default value | Description | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
String | String | Navigation bar title text content | ||||||||||||||||||||||||||||||||
HexColor | #000000 | Navigation bar background color | ||||||||||||||||||||||||||||||||
String | white | Navigation bar title color, only supports black/white | ||||||||||||||||||||||||||||||||
HexColor | #ffffff | Background color of the window | ||||||||||||||||||||||||||||||||
String | dark | The style of drop-down loading, only supports dark/light | ||||||||||||||||||||||||||||||||
Boolean | false | Whether to enable pull-down refresh globally | ||||||||||||||||||||||||||||||||
Number | 50 | The distance from the bottom of the page when the page pull-to-bottom event is triggered, in px |
Required | Default value | Description | ||
---|---|---|---|---|
No | bottom | The position of tabBar, only supports | bottom | | borderStyle
No | black | The color of the upper border of tabbar, only supports | black | /white
| color
No | ##tabBar Default color for text above (unselected) | selectedColor | ||
No | Default color of text when tabBar is selected | backgroundColor | ||
No | The background color of tabBar | list | ||
is the tab of | tabBar List, minimum 2, maximum 5 |
Required | Description | ##pagePath | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
page path, which must be defined first in pages | text | String | ||||||||||||||||||||||||||||||||
Button text on tab | iconPath | String | ||||||||||||||||||||||||||||||||
Image path, icon size limit is 40kb, the recommended size is 81px * 81px, network images are not supported | selectedIconPath | String | ||||||||||||||||||||||||||||||||
The image when selected Path, icon size is limited to 40kb, recommended size is 81px * 81px, network images are not supported |
Attributes | Type | Default Value | Description |
---|---|---|---|
navigationBarBackgroundColor | HexColor | #000000 | Current navigation Bar background color |
navigationBarTextStyle | String | white | Navigation bar title color, only supports black / white |
navigationBarTitleText | String | ||
HexColor | #ffffff | Background color of the current window | |
String | dark | The style of pull-down loading on the current page, only supports dark/light | |
Boolean | false | Whether to enable pull-down refresh for the current page | |
Number | 50 | Page pull-up bottom event Distance from the bottom of the page when triggered, in px |
The above is the detailed content of In-depth analysis of global configuration in mini programs. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Notepad++7.3.1
Easy-to-use and free code editor

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)