TabBar FAQs
Supported Function FAQs
Q: Does the page of tab bar support redirecting with parameters?
A: Yes, the page of tab bar supports jumping with parameters.
Q: Does the location of tab bar support being set at the top?
A: The location of the tab bar does not support custom settings now.
Q: How to monitor tab bar tapping events?
A: You can monitor tab bar tapping events by using onTabItemTap
in the mini program.
Q: Does the icon of tab bar support SVG format?
A: SVG format is not supported. Only PNG/JPEG/JPG/GIF formats 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 the style.
"tabBar": {
"textColor": "#404040",
"selectedColor": "#108ee9",
"backgroundColor": "#F5F5F9"
}
Exception Requests FAQs
Q: What to do if an error "Cannot read property getCurrentPages
of undefined" occurs when switching the tab bar?
A: Error path. Please check the path of the tab bar.
Q: Why tab bar is not displayed after the page is redirected?
A: If the user enters the page by my.navigateTo or my.redirectTo, the bottom tab bar is not displayed. The first page of the tab bar must be the homepage.
Q: How to obtain the upper page path after entering the tab bar page?
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.