# Page configuration

Part of the configuration in apagejson also supports configuration of individual pages, and can be configured to configure the behavior of the page in the.jsonfile corresponding to the page.

The configuration item on the page overrides theapagejsonThe same configuration item in(the style-related configuration item belongs toapagejson in``windowAttributes, but there is no need to specify thewindowfield additionally. The specific values and implications can be found in the global configuration document .

The file content is a JSON object with the following attributes:

# Configuration items

attribute type Default values describe Minimum version
navigationBarBackgroundColor HexColor #000000 Background color of the navigation bar, such as# 000000
navigationBarTextStyle string white Navigation bar title, color, only supportblack/white
navigationBarTitleText string Navigation bar Title text content
navigationStyle string default 导航栏样式,仅支持以下值:

default默认样式

custom自定义导航栏,只保留右上角胶囊按钮。
IOS / Android WeChat Guest Terminal 7.0.0, Windows / Mac Terminal Basic Library > = v3.6.1
homeButton boolean false The navigation bar displays the home key in a page that is not on the front page, not on the bottom page of the page stack, or not in the tabbar WeChat Passenger 8.0.24
backgroundColor HexColor #ffffff The background color of the window
backgroundColorContent HexColor #RRGGBBAA Page container backview, Click to view set backview details
backgroundTextStyle string dark Drop loading style, only supportdark/light
backgroundColorTop string #ffffff Back view of the top window, iOS only supported WeChat Passenger 6.5.16
backgroundColorBottom string #ffffff Backview of the bottom window, iOS only supported WeChat Passenger 6.5.16
enablePullDownRefresh boolean false Whether to turn on the current page drop-down refresh.

See Page.onPullDownRefresh
onReachBottomDistance number 50 The distance from the bottom of the page when the bottom of the page is triggered, in px.

See Page.onReachBottom
pageOrientation string portrait Screen rotation settings, supportauto/portrait/landscape

See Response shows area changes
2.4.0 (auto) / 2.5.0 (landscape)
disableScroll boolean false Set totruethen the page as a whole cannot scroll up and down.

is valid only in page configuration, cannot be set inapagejson
usingComponents Object no Page Custom Components Configuration 1.6.3
initialRenderingCache string Page Initial Render Cache configuration, supportingstatic/dynamic/capture 2.11.1
style string default Enable a new version of the component style 2.10.2
singlePage Object no Configurations related to single page mode 2.12.0
restartStrategy string homePage Restart Policy Configuration 2.8.0
handleWebviewPreload string static Control when preloads the next page .Supportstatic/manual/ [[TAG3-START]] auto` 2.15.0
visualEffectInBackground string no Hide the content of the page when you enter the back of the system to protect user privacy.Supporthidden/none,Setting the page individually overrides the global configuration, see Global Configuration 2.15.0
enablePassiveEvent Object或boolean no If the event listener is passive, it overrides the global configuration if it is set separately for the page, see Global Configuration 2.24.1
renderer string no Rendering the back end 2.30.4
rendererOptions Object no Render backend options, details Related Documents 3.1.0
componentFramework string no Component framework, details Related Documents 2.30.4
  • Note: Not all configurations inapagejsoncan be overwritten on the page or specified separately, limited to the options contained in this document.
  • Note: iOS / Android Client 7.0.0 The following versions,navigationStyleonly work inapagejson.

# Configuration example

{
  "navigationBarBackgroundColor": "#ffffff",
  "navigationBarTextStyle": "black",
  "navigationBarTitleText": "微信接口功能演示",
  "backgroundColor": "#eeeeee",
  "backgroundTextStyle": "light"
}