Tabbar not showing on sub pages WeChat applet

91 views Asked by At

I want the tabbar to appear on all pages (for e.g., A, B, C, D & E) . I have three tabs (page A, B & C) in the tabbar . From page C, it navigates to page D and then from page D to E.

{"pages": [ "pages/A/A", "pages/B/B", "pages/C/C","pages/D/D", "pages/E/E",], "tabBar": { "color": "#8a8a8a", "borderStyle": "black", "backgroundColor": "#ffffff", "selectedColor": "#d4237a", "list": [ { "text":"A", "pagePath":"pages/A/A" }, { "text": "B", "pagePath":"pages/B/B" }, { "text": "C", "pagePath":"pages/C/C" } ] }, "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black", "enablePullDownRefresh": true }, "sitemapLocation": "sitemap.json", "style": "v2" }

TabBar not showing on pages D & E, and can't navigate to B (tabbar page) from E. Any help on this?

1

There are 1 answers

0
taolu On

It will only show tabbar in tabbar pages which configure in app.json. So,if you want to show tabbar in others page, you can edit tabbar-component in a custom components.And then import the tabbar-component in other pages.Of course, it means you will give up origin tabbar in “app.json” that wechat supports.With this method,you can use "wx.navigateTo" from each pages instead of "wx.switchTo".