美文网首页
微信小程序之tabbar

微信小程序之tabbar

作者: 心情的蛊惑 | 来源:发表于2018-11-02 10:02 被阅读4次

之前学习了微信小程序怎么新建页面,现在来get下tabbar。
在这里我先建立了pages的同级文件夹images来存放图片。
然后在pages文件夹中建立两个页面,first,second。
最后在,app.json上编辑代码

{
"pages":[
"pages/first/first",
"pages/second/second",
"pages/index/index",
 "pages/logs/logs"
],
"window":{
 "backgroundTextStyle":"light",
 "navigationBarBackgroundColor": "#fff",
 "navigationBarTitleText": "WeChat",
 "navigationBarTextStyle":"black"
},
"tabBar": {
 "list": [
   {
     "pagePath": "pages/first/first",
     "text": "first",
     "iconPath": "images/ka.png",
     "selectedIconPath": "images/ning.png"
   },
   {
     "pagePath": "pages/second/second",
     "text": "second",
     "iconPath": "images/文章.png",
     "selectedIconPath": "images/猕猴桃.png"
   }
 ]
}
}

屏幕快照 2018-11-02 上午10.01.44.png

相关文章

网友评论

      本文标题:微信小程序之tabbar

      本文链接:https://www.haomeiwen.com/subject/zhdqxqtx.html