Page Configuration
Some configurations in app.json also support configuration of a single page. You can configure the performance of this page in the .json file corresponding to the page.
The configuration items in the page will overwrite the same configuration items in app.json on the current page (the style-related configuration items belong to the window attribute in app.json, but there is no need to specify the window field here). For specific values Global Configuration In the description.
The file content is a JSON object with the following properties:
Configuration items
| Properties | Type | Required | Description |
|---|---|---|---|
| navigationBarBackgroundColor | HexColor | #000000 | Navigation bar background color, such as #000001 |
| navigationBarTextStyle | string | white | Navigation bar title, status bar color, only supports: black / white |
| navigationBarTitleText | string | Navigation bar title text content | |
| navigationStyle | string | default | Navigation bar style, only supports the following values: -default default style -custom custom navigation bar, only keep the upper right corner pill button -hide custom navigation bar, can support privacy navigation bar and pill button. See Note 2 immediately after the table |
| backgroundColor | HexColor | #ffffff | Window background color |
| backgroundTextStyle | string | dark | Pull-down loading style, only supports dark / light |
| backgroundColorTop | string | #ffffff | Top window background color, only iOS support |
| backgroundColorBottom | string | #ffffff | Top window background color, only iOS support |
| enablePullDownRefresh | boolean | false | Whether to enable pull-down refresh on the current page See for details Page.onPullDownRefresh |
| onReachBottomDistance | number | 50 | The distance from the bottom of the page when the pull-to-bottom event is triggered, in px See for details Page.onReachBottom |
| pageOrientation | string | portrait | Screen rotation settings, support auto / portrait / landscape See for details Responding to display area changes |
| disableScroll | boolean | false | If set to true, the entire page cannot be scrolled up and down. It is only valid in the page configuration and cannot be set in app.json |
| usingComponents | Object | No | Page Custom Components Configuration |
TIP
Not all configurations in app.json can be overwritten or specified separately on the page, limited to the options included in this document.
Configuration example:
js
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "WeChat interface function demonstration,"
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light"
}