tabBar / 小程序设计与开发 #4

in hive-180932 •  3 years ago 

news.jpg

tabBar

全局配置

可以通过 tabBar 配置项切换显示不同的对应页面。

app.json中配置(框架-> 配置),最少两个,最多五个

图片使用png格式,背景透明,81px * 81px
背影色:#f7f7fa,图标色:选中时"#ff6600",没选中时#999999

"tabBar": {
    "selectedColor":"#ff6600",
    "list": [
      {
        "pagePath": "pages/index/index",
        "text": "首页",
        "iconPath": "images/logo2.png",
        "selectedIconPath": "images/logo.png"
      },
      {
        "pagePath": "pages/courses/courses",
        "text": "课程",
        "iconPath": "images/logo2.png",
        "selectedIconPath": "images/logo.png"
      }] }
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!