Navigation on top of the configuration applet written in .json file.
Related attributes and attribute values
Attributes | Types of | Defaults | description | Minimum version |
---|---|---|---|---|
navigationBarBackgroundColor | HexColor | #000000 | Navigation bar background color, such as "# 000000" | |
navigationBarTextStyle | String | white | ||
navigationBarTitleText | String | Navigation bar title text | ||
navigationStyle | String | default | Navigation bar style, supports only default / custom. Customizable custom navigation mode, leaving only the top right button capsular micro-channel version | 6.6.0 |
backgroundColor | HexColor | #ffffff | Background color of the window | |
backgroundTextStyle | String | dark | Background drop-down font, loading chart styles, supports only dark / light | |
enablePullDownRefresh | Boolean | false | Whether to open the drop-down refresh, see the relevant page event handler | |
onReachBottomDistance | Number | 50 |
1.HexColor (hexadecimal color values), such as "# FF00FF"
2.About navigationStyle
- The client version 7.0.0 or less, navigationStyle only take effect in app.json.
- The client version 6.7.2 start, navigationStyle: custom components for web-view invalid
- After opening custom, low version of the client need to be compatible. Developer Tools to cut basic library version 1.7.0 (minimum version does not mean, only for debugging) can be easily cut to the old vision
3. About navigationBarTextStyle
Navigation Bar title color support only
black/white
Code Display
Write the following code in app.json in:
"window": {
"backgroundTextStyle": "light",
"backgroundColor":"#cccccc",
"navigationBarBackgroundColor": "#ff9700",
"navigationBarTitleText": "小程序",
"navigationBarTextStyle": "white"
}
when we setbackgroundColor
the time, actually can not see the effect in the computer simulator. This is becausebackgroundColor
the background color of the form refers to the background color, rather than a page, that form the pull-down refresh or upload on exposed Raja background. In the computer simulator can not see this action, it will be mistaken for this configuration is invalid. If you want to set the background color of the page, was thewxss
custom styles, as follows:
page {
background-color: #cccccc;
}