在pages.json中配置代码如下:
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationBarBackgroundColor":"#eee"
}
}
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationBarBackgroundColor":"#eee"
}
}
,{
"path" : "pages/login/login",
"style" : {
"navigationBarTitleText": "动态",
"navigationBarBackgroundColor":"#eee"
}
}
,{
"path" : "pages/home/home",
"style" : {
"navigationBarTitleText": "发现",
"navigationBarBackgroundColor":"#eee"
}
}
,{
"path" : "pages/my/my",
"style" : {
"navigationBarTitleText": "我的",
"navigationBarBackgroundColor":"#eee"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar":{
"color": "#cdcdcd",
"selectedColor": "#39cffc",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/icon/index.png",
"selectedIconPath": "static/icon/index1.png",
"text": "首页"
}, {
"pagePath": "pages/login/login",
"iconPath": "static/icon/login.png",
"selectedIconPath": "static/icon/login1.png",
"text": "发现"
},
{
"pagePath": "pages/home/home",
"iconPath": "static/icon/home.png",
"selectedIconPath": "static/icon/homes.png",
"text": "动态"
}, {
"pagePath": "pages/my/my",
"iconPath": "static/icon/mys.png",
"selectedIconPath": "static/icon/mys.png",
"text": "我的"
}]
}
}
"path" : "pages/login/login",
"style" : {
"navigationBarTitleText": "动态",
"navigationBarBackgroundColor":"#eee"
}
}
,{
"path" : "pages/home/home",
"style" : {
"navigationBarTitleText": "发现",
"navigationBarBackgroundColor":"#eee"
}
}
,{
"path" : "pages/my/my",
"style" : {
"navigationBarTitleText": "我的",
"navigationBarBackgroundColor":"#eee"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar":{
"color": "#cdcdcd",
"selectedColor": "#39cffc",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/icon/index.png",
"selectedIconPath": "static/icon/index1.png",
"text": "首页"
}, {
"pagePath": "pages/login/login",
"iconPath": "static/icon/login.png",
"selectedIconPath": "static/icon/login1.png",
"text": "发现"
},
{
"pagePath": "pages/home/home",
"iconPath": "static/icon/home.png",
"selectedIconPath": "static/icon/homes.png",
"text": "动态"
}, {
"pagePath": "pages/my/my",
"iconPath": "static/icon/mys.png",
"selectedIconPath": "static/icon/mys.png",
"text": "我的"
}]
}
}
相应的效果如下:
再宏伟的目标,拆分下来,也只是一串串的代码而已;一串串的代码,细分来看,也只是一个一个的字母而已!也许,我做不到一晚上完成大神一小时随便敲打的项目,但为这一目标,每天添砖加瓦,我想我应该是可以完成的!