创建项目后在你的根目录下找到pages.json(引入以下代码)
(图标要自己下载放到你根目录下的static里面使用)
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
},
{
"path": "pages/index1/index1",
"style": {
"navigationBarTitleText": "我的"
}
}
],
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/nav-bar.png",
"selectedIconPath": "static/nav-bar.png",
"text": "首页"
},{
"pagePath": "pages/index1/index1",
"iconPath": "static/load-more.png",
"selectedIconPath": "static/load-more.png",
"text": "我的"
}]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}