• 微信小程序之 Tabbar(底部选项卡)


    1.项目目录

    2.在app.json里填写:tab个数范围2-5个

    app.json

    {
      "pages": [
        "pages/index/index",
        "pages/audiobook/audiobook",
        "pages/broadcast/broadcast",
        "pages/group/group",
        "pages/mine/mine"
      ],
      "window": {
        "backgroundTextStyle": "light",
        "navigationBarBackgroundColor": "#fff",
        "navigationBarTitleText": "WeChat",
        "navigationBarTextStyle": "black"
      },
      "tabBar": {
        "color": "#949494",
        "selectedColor": "#42bd56",
        "borderStyle": "black",
        "list": [
          {
            "selectedIconPath": "assets/images/ic_tab_home_active.png",
            "iconPath": "assets/images/ic_tab_home_normal.png",
            "pagePath": "pages/index/index",
            "text": "首页"
          },
          {
            "selectedIconPath": "assets/images/ic_tab_subject_active.png",
            "iconPath": "assets/images/ic_tab_subject_normal.png",
            "pagePath": "pages/audiobook/audiobook",
            "text": "书影音"
          },
          {
            "selectedIconPath": "assets/images/ic_tab_status_active.png",
            "iconPath": "assets/images/ic_tab_status_normal.png",
            "pagePath": "pages/broadcast/broadcast",
            "text": "广播"
          },
          {
            "selectedIconPath": "assets/images/ic_tab_group_active.png",
            "iconPath": "assets/images/ic_tab_group_normal.png",
            "pagePath": "pages/group/group",
            "text": "小组"
          },
          {
            "selectedIconPath": "assets/images/ic_tab_profile_active.png",
            "iconPath": "assets/images/ic_tab_profile_normal.png",
            "pagePath": "pages/mine/mine",
            "text": "我的"
          }
        ]
      }
    }

    3.属性详解

    4.效果图

  • 相关阅读:
    kaggle CTR预估
    基于大规模语料的新词发现算法【转自matix67】
    vim E437: terminal capability "cm" required
    makefile 中的符号替换($@、$^、$<、$?)
    【转】Makefile 中:= ?= += =的区别
    python urljoin问题
    python 写文件刷新缓存
    python Popen卡死问题
    nohup 日志切割
    换行和回车野史
  • 原文地址:https://www.cnblogs.com/crazycode2/p/8298392.html
Copyright © 2020-2023  润新知