zoukankan      html  css  js  c++  java
  • 微信小程序--微信小程序tabBar不显示:缺少文件,错误信息:error:iconPath=

    1.list中的第一个tab的地址必须定义在pages 中

    2.pagePath的地址一定要正确

    正确写法是:

    "tabBar": {
        "color": "#99999",  //tab 上的文字默认颜色
        "selectedColor": "#1c8df5",  //tab 上的文字选中时的颜色
        "borderStyle": "white",   //tabbar上边框的颜色, 仅支持 black/white ,出现黑边框把它设置成白色就可以了
        "backgroundColor": "#fff",  //tab 的背景色
        "position": "bottom",   //可选值 bottom、top
        "list": [    //tab 的列表,详见 list 属性说明,最少2个、最多5个 tab
          {
            "pagePath": "pages/index/index",   //页面路径,必须在 pages 中先定义
            "selectedIconPath": "pages/Image/indexYes.png",  //选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px
            "iconPath": "pages/Image/indexNo.png",  //图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px
            "text": "项目"  //tab 上按钮文字
          },
        ]
      }

    我的文件目录结构:

    >pages
      >Image
        >indexYes.png
      >index
        >index.wxml
        >index.js
        >index.wxss
  • 相关阅读:
    [cf1097F]Alex and a TV Show
    [cf1097E]Egor and an RPG game
    2.2 物理层下面的传输媒体
    2.1 物理层的基本概念
    8 垃圾回收
    7 直接内存
    6 方法区
    1.5 计算机网络体系结构
    1.4 计算机网络的性能指标
    1.3 计算机网络的定义和分类
  • 原文地址:https://www.cnblogs.com/JinQing/p/6693592.html
Copyright © 2011-2022 走看看