首页 > 技术文章 > 记录一次前端页面 跳转请求

focusHots 2019-09-29 16:05 原文


  修改app.js,在config中的page下新增test1页面路径:

  
pages:[
   'pages/index/index',
   'pages/index/test'
  ],

  

   在config下新增tabBar节点:

   其中的图片需要放在相应的路径下:

  
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" }] }

同时可以达到使用本地图片

 底部固定栏用本地图片:

    两个操作:

  import  addpng  from '../../assets/img/add.png',

       然后在TabBar中使用 image: addpng  即可

 

推荐阅读