底部路由跳转
那个文件需要跳转,就要在app.json文件中引入
{
"pages":[
"pages/index/index",
"pages/list/list",
"pages/cart/cart",
"pages/my/my",
"pages/logs/logs"
],
// 底部 路由
"tabBar": {
// 默认不选中的文字的颜色
"color": "#bfbfbf",
// 选中的颜色
"selectedColor": "#d81e06",
"list": [
{
"selectedIconPath": "./static/icon/home1.png", // 选中的icon的路径
"iconPath": "./static/icon/home.png", // 默认未选中的icon的路径
"pagePath": "pages/index/index", // 文件路径
"text": "首页" // icon下面的文字
},
{
"selectedIconPath": "./static/icon/list1.png",
"iconPath": "./static/icon/list.png",
"pagePath": "pages/list/list",
"text": "分类"
},
{
"selectedIconPath": "./static/icon/shopCar1.png",
"iconPath": "./static/icon/shopCar.png",
"pagePath": "pages/cart/cart",
"text": "购物车"
},
{
"selectedIconPath": "./static/icon/user1.png",
"iconPath": "./static/icon/user.png",
"pagePath": "pages/my/my",
"text": "个人"
}
]
}
}
网友评论