记录一次TabBar使用本地图片

方法一:

 

 

 第一步:import  addpng  from '../../assets/img/add.png'

 第二步: { title: '找折扣', image: addpng}, 

 即可。

方法二:

       在app.js中添加如下信息节点:

    

tabBar: {
      list: [
        {
          pagePath: "pages/index/index",
          text: "首页",
          iconPath: "./images/tab/home.png",
          selectedIconPath: "./images/tab/home-active.png"
        },
        {
          pagePath: "pages/test1/index",
          text: "测试1",
          iconPath: "./images/tab/home.png",
          selectedIconPath: "./images/tab/home-active.png"
        }]
    }

  

posted @ 2019-10-10 14:42  紫色水杯  阅读(...)  评论(...编辑  收藏