小程序

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

 

TAG标签: 微信小程序缺少

http://www.xiaochengxub.com/read-104857.html