TabBar FAQ

Supported Function FAQ

Q: Does the page of tab bar support redirecting with parameters?

A: Yes, the page of tab bar support jumping with parameters.

Q: Does the location of tab bar support to be set to the top?

A: The location of tab bar does not support custom settings now.

Q: How to monitor tab bar tapping event?

A: You can monitor tab bar tapping event by using onTabItemTap in Mini Program.

Q: Does the icon of tab bar support SVG format?

A: SVG format is not supported, only PNG/JPEG/JPG/GIF format are supported.

Q: How to set the style of tab bar?

A: You can set the style of tab bar in the JSON, which is shown as follows. And you can also call my.setTabBarStyle to set.

copy
"tabBar": {
    "textColor": "#404040",
    "selectedColor": "#108ee9",
    "backgroundColor": "#F5F5F9"
}

Exception Requests FAQ

Q: What to do if an error of Cannot read property 'getCurrentPages' of undefined is reported when switching tab bar?

A: Error path. Please check the path of tab bar.

Q: Why tab bar is not displayed after the page is redirected?

A: If the user arrived to the page by my.navigateTo or my.redirectTo, the bottom tab bar is not displayed. Besides, the first page of tab bar must be the homepage.

Q: How to obtain the upper page path after entering the page of tab bar?

A: Save the current page path globally when entering the tab bar page, and you can get the upper page path by using the global address when switching tab bar pages.