The status bar applet, navigation bar, title, window background color settings

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 guide Boat column Mark question Color color b l a c k / w h i t e \ Color {red} {navigation bar title color, supports only black / 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

\color{red}{注意:}
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 onlyblack/white

Code Display

Write the following code in app.json in:

"window": {
    "backgroundTextStyle": "light",
    "backgroundColor":"#cccccc",
    "navigationBarBackgroundColor": "#ff9700",
    "navigationBarTitleText": "小程序",
    "navigationBarTextStyle": "white"
  }

\color{red}{注意:}
when we setbackgroundColorthe time, actually can not see the effect in the computer simulator. This is becausebackgroundColorthe 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 thewxsscustom styles, as follows:

page {
    background-color: #cccccc;
}

Renderings

Guess you like

Origin blog.csdn.net/weixin_43363871/article/details/91949351