记录一次前端页面 跳转请求


  修改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  即可

原文地址:https://www.cnblogs.com/focusHots/p/11608394.html