Each page can also use a small program .json file to configure the window performance this page. Entry configuration items in the same window the current page will override app.json the page configuration. Contents of the file into a JSON object with the following attributes:
Configuration Example
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "微信接口功能演示",
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light"
}
Configuration Item
Attributes | Types of | Defaults | description | Minimum version |
---|---|---|---|---|
navigationBarBackgroundColor | HexColor | #000000 | Navigation bar background color, such as #000000 |
|
navigationBarTextStyle | string | white | Navigation Bar title color, only supports black /white |
|
navigationBarTitleText | string | Navigation bar title text | ||
navigationStyle | string | default | Navigation bar style, only supports the following values: default default style custom navigation bar, leaving only the top right button capsulecustom |
7.0.0 Client WeChat |
backgroundColor | HexColor | #ffffff | Background color of the window | |
backgroundTextStyle | string | dark | Loading the pull-down style, only supports dark /light |
|
backgroundColorTop | string | #ffffff | The background color of the top of the window, only iOS support | WeChat client 6.5.16 |
backgroundColorBottom | string | #ffffff | The background color of the bottom of the window, only iOS support | WeChat client 6.5.16 |
enablePullDownRefresh | boolean | false | Whether to open the drop-down refresh the current page. See Page.onPullDownRefresh |
|
onReachBottomDistance | number | 50 | Distance from the bottom of the page, the unit is bottoming px pull the trigger on the event page. See Page.onReachBottom |
|
pageOrientation | string | portrait | Set screen rotation support auto / portrait / landscape See the display area in response to changes in |
2.4.0 (auto) / 2.5.0 (landscape) |
disableScroll | boolean | false | Set true the page as a whole can not scroll up and down. Only valid configuration page, not in app.json settings |
|
disableSwipeBack | boolean | false | Prohibition page right slide gestures return | 7.0.0 Client WeChat |
usingComponents | Object | no | Page custom component configuration | 1.6.3 |
Page configuration can only be set
app.json
inwindow
the corresponding configuration items to determine the window performance of this page, there is no need to writewindow
this property.