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
  • 相关阅读:
    AE旋转
    AE2
    AE1
    面试
    TS 基础数据类型
    vue-cli结构介绍
    js异步加载的5种方式
    slot 插槽的使用
    使用组件的细节点
    Vue 条件渲染
  • 原文地址:https://www.cnblogs.com/JinQing/p/6693592.html
Copyright © 2011-2022 走看看