zoukankan      html  css  js  c++  java
  • 微信小程序tabBar显示问题

    微信小程序的开发中,我遇到疑惑如下:

    在app.json中定义了多个pages,一般微信小程序启动的时候,自动加载pages下的第一个页面,

    "pages": [
          
       
         "pages/index/index",
         
          "pages/main/main",
          "pages/you/you",
          "pages/me/me"
      ],

    "tabBar": {
        "color": "#929292",
        "selectedColor": "#ff2d55",
        "borderStyle": "white",
        "backgroundColor": "#ffffff",
        "list": [{
          "pagePath": "pages/me/me",
          "iconPath": "image/tabbar/1.png",
          "selectedIconPath": "image/tabbar/1-hl.png", 
          "text": "我的demo"                      
        }, {
          "pagePath": "pages/you/you",
          "iconPath": "image/tabbar/2.png",
          "selectedIconPath": "image/tabbar/2-hl.png",
          "text": "demo1"
        }

    如果将index 或者main放在第一行,tabBar并不显示出来,但是you 和me 页面放在第一行的时候,是可以显示的,后来查到是因为只有当放在第一行的页面是在tabBar的list的某一个页面才可以显示,也就是说you 和me页面是在tabBar的list下面,所以可以显示,而另外的2个不能显示

  • 相关阅读:
    Jinja2模板引擎简介
    单元测试
    Blueprint属性
    状态保持中的cookie
    异常捕获abort方法
    数据库迁移
    Flask-SQLAlchemy中 ORM 一对多的模型关系定义步骤
    request请求的常用属性
    搜索引擎
    Mark
  • 原文地址:https://www.cnblogs.com/chengqiaoli/p/6284903.html
Copyright © 2011-2022 走看看