详见uniapp框架
tabbar
首先创建出相应的页面
然后在pages json中 进行配置 tabbar
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
},
{
"path": "pages/about",
"style": {
"navigationBarTitleText": "about"
}
}, {
"path": "pages/profile/profile",
"style": {}
}, {
"path": "pages/bar1/bar1",
"style": {}
}, {
"path": "pages/bar2/bar2",
"style": {}
}, {
"path": "pages/bar3/bar3",
"style": {}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/lol.png",
"selectedIconPath": "static/logo(1).png",
"text": "index"
},
{
"pagePath": "pages/bar1/bar1",
"iconPath": "static/lol.png",
"selectedIconPath": "static/logo(1).png",
"text": "bar1"
}, {
"pagePath": "pages/bar2/bar2",
"iconPath": "static/logo(1).png",
"selectedIconPath": "static/lol.png",
"text": "bar2"
},
{
"pagePath": "pages/bar3/bar3",
"iconPath": "static/lol.png",
"selectedIconPath": "static/logo(1).png",
"text": "bar3"
}
]
}
}