当前位置:   article > 正文

微信小程序——底部导航栏_微信小程序底部导航栏

微信小程序底部导航栏

在app.json文件下与“pages”同级

  1. "tabBar": {
  2. "list": [{
  3. "pagePath": "pages/firstPage/firstPage",
  4. "text": "首页",
  5. "iconPath": "./images/index.png",
  6. "selectedIconPath": "./images/index_s.png"
  7. },
  8. {
  9. "pagePath": "pages/info/info",
  10. "text": "消息",
  11. "iconPath": "./images/msg.png",
  12. "selectedIconPath": "./images/msg_s.png"
  13. },
  14. {
  15. "pagePath": "pages/connect/connect",
  16. "text": "联系我们",
  17. "iconPath": "./images/ours.png",
  18. "selectedIconPath": "./images/ours_s.png"
  19. }
  20. ]
  21. },

tabBar 是移动端应用常见的页面效果,用于实现多页面的快速切换。、

小程序中通常将其分为:底部 tabBar、顶部 tabBar。
注意:
tabBar中只能配置最少 2 个、最多 5 个 tab 页签
当渲染顶部 tabBar 时,不显示 icon,只显示文本

tabBar 节点的配置项

 

每个 tab 项的配置选项

 

tarBar的相关知识

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/726969
推荐阅读
相关标签
  

闽ICP备14008679号