Applet development: Four (window) Global Settings applet status bar, navigation bar, title, window background color.

window

The status bar is used to set applet, navigation bar, title, window background color.

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 custom navigation bar, leaving only the upper right corner of capsules button. See note 2.
6.6.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 global pull-down refresh.
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)
  • Note 1: HexColor (hexadecimal color values), such as "# ff00ff"
  • Note 2: AboutnavigationStyle
    • The client version 7.0.0 or less, navigationStyle only  app.json take effect in.
    • Client 6.7.2 version, navigationStyle: custom for  web-view  component is 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

Such as:

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

 

Guess you like

Origin www.cnblogs.com/start2019/p/11854183.html