uni-app底部导航tabBar的使⽤uni-app的艰难学习之路
step1—学习
官⽹说明:官⽹>配置>page.json>tabBar
selectediconpath什么意思step2—使⽤
1、在pages中新建⽂件
2、在pages.json⽂件⾥写配置代码
{
"pages": [ //pages数组中第⼀项表⽰应⽤启动页,参考:uniapp.dcloud.io/collocation/pages    {
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "天天好物"
}
},
{
"path" : "pages/search/search",
"style" : {
"navigationBarTitleText": "搜索"
}
},
{
"path" : "pages/rankingList/rankingList",
"style" : {
"navigationBarTitleText": "排⾏榜"
}
},
{
"path" : "pages/dongdongqiang/dongdongqiang",
"style" : {
"navigationBarTitleText": "咚咚抢"
}
{
"path" : "pages/me/me",
"style" : {
"navigationBarTitleText": "我的"
}
}
],
"tabBar": {
"color":"#8a8a8a",
"selectedColor":"#d4237a",
"borderStyle":"black",
"backgroundColor":"#ffffff",
"list": [
{
"pagePath":"pages/index/index",
"text":"⾸页",
"iconPath":"static/home_normal.png",
"selectedIconPath":"static/home.png"
},
{
"pagePath":"pages/search/search",
"text":"搜索",
"iconPath":"static/search_normal.png",
"selectedIconPath":"static/search.png"
},
{
"pagePath":"pages/rankingList/rankingList",
"text":"排⾏榜",
"iconPath":"static/paihangbang_normal.png",
"selectedIconPath":"static/paihangbang.png"
},
{
"pagePath":"pages/dongdongqiang/dongdongqiang",    "text":"咚咚抢",
"iconPath":"static/alert_normal.png",
"selectedIconPath":"static/alert.png"
},
{
"pagePath":"pages/me/me",
"text":"我的",
"iconPath":"static/me_normal.png",
"selectedIconPath":"static/me.png"
}
]
}
}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。