Skip to content

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

PropertiesTypeRequiredDescription
navigationBarBackgroundColorHexColor#000000Navigation bar background color, such as #000003
navigationBarTextStylestringwhiteNavigation bar title, status bar color, only supports: black / white
navigationBarTitleTextstringNavigation bar title text content
navigationStylestringdefaultNavigation 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
backgroundColorHexColor#ffffffWindow background color
backgroundTextStylestringdarkPull-down loading style, only supports dark / light
backgroundColorTopstring#ffffffTop window background color, only iOS support
backgroundColorBottomstring#ffffffTop window background color, only iOS support
enablePullDownRefreshbooleanfalseWhether to enable pull-down refresh on the current page See for details Page.onPullDownRefresh
onReachBottomDistancenumber50The distance from the bottom of the page when the pull-to-bottom event is triggered, in px See for details Page.onReachBottom
pageOrientationstringportraitScreen rotation settings, support auto / portrait / landscape See for details Responding to display area changes
disableScrollbooleanfalseIf 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
usingComponentsObjectNoPage 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"
}