Get the App
SLTechnology News&Howtos  ›  Development  › 

An example Analysis of Chinese Annotation api in WeChat Mini Programs's bottom Navigation of tabBar

Shulou Source: shulou.com Published: 2022-06-03 19:28:41 11月12日 Update

This article mainly introduces the example analysis of WeChat Mini Programs's tabBar bottom navigation Chinese annotation api, which is very detailed and has a certain reference value. Interested friends must finish reading it!

WeChat Mini Programs tabBar bottom navigation Chinese note api, the letter mini program tabBar is the navigation bar at the bottom of app, you can put 1-5 navigation links, here is the Chinese explanation of WeChat Mini Programs bottom navigation tabbar.

WeChat Mini Programs tabBar is configured in the global app.json file.

Notes on Mini Program tabBar configuration Code

{"pages": ["pages/index/index", "pages/detail/detail"], "window": {"navigationBarTitleText": "TabBar", "navigationBarBackgroundColor": "# F60", "navigationBarTextStyle": "white"}, / / tabBar Note: B is uppercase. If tab does not appear when asked by a friend, check whether there is a manual error "tabBar": {/ / the document indicates that color is required, but it can be empty. Do not rewrite color is dark gray, the style is more unified "color": "# ddd", / / again, the document points out that selectedColor is a required item, but selectedColor needs to be rewritten to distinguish between the current item and the ordinary item "selectedColor": "# 3cc51f", / / similarly, the document points out that color is required, but it can be empty, not rewriting backgroundColor is light gray, and the style is more unified. "backgroundColor": "# fff", / / borderStyle. If you don't write it, it will be black by default. If you don't write it, it will be black. If you use white, you will lose a separator line and mix with the page. "borderStyle": "black", "list": [{"pagePath": "pages/index/index", / / iconPath icon is not required, but the tab column will become shorter. Natural selectedIconPath may not write "iconPath": "image/icon_API.png", "selectedIconPath": "image/icon_API_HL.png", "text": "index"}, {"pagePath": "pages/detail/detail", "iconPath": "image/icon_component.png", "selectedIconPath": "image/icon_component_HL.png" "text": "detail"]}}

Mini Program tabBar parameter description

If our Mini Program is a multi-tab application (there is a tab bar at the bottom of the client window to switch pages), then we can use the tabBar configuration item to specify the performance of the tab bar and the corresponding page to display when tab switches.

TabBar is an array, and you can only configure at least 2 and up to 5 tab,tab to sort in the order of the array.

Attribute description:

Where list accepts an array, each item in the array is an object with the following property values:

The above is all the contents of the article "sample Analysis of WeChat Mini Programs's tabBar bottom Navigation Chinese Notes api". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Programs bottom navigation annotations Chinese that is arrays configurations documents pages examples analysis content properties styles articles switching unified general necessary Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Information Apple Microsoft Linux