文章目录
全局配置
注意:在tarbar中设置position为top时导航栏在页面上方,切没有图标
代码如
"tabBar":{
"position":"top",//设为top时
"selectedColor":"#1afa29",
"list":[
{
"text":"首页",
"pagePath":"pages/index/index",
"iconPath":"static/shouye.png",
"selectedIconPath":"static/shouye-active.png"
},
{
"text":"分类",
"pagePath":"pages/category/category",
"iconPath":"static/category_2.png",
"selectedIconPath":"static/category-active.png"
},
{
"text":"分类",
"pagePath":"pages/cart/cart",
"iconPath":"static/cart.png",
"selectedIconPath":"static/cart-active.png"
},
{
"text":"我的",
"pagePath":"pages/my/my",
"iconPath":"static/wode.png",
"selectedIconPath":"static/wode-active.png"
}
]
}
tarbar中position设为top时页面:
tarbar中position设为bottom(默认为bottom)时页面: