简体   繁体   中英

Tabbar not showing on sub pages WeChat applet

I want the tabbar to appear on all pages (for eg, 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?

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".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM