1,第一步 去到app.json中的pages中添加对应底部导航的页面
2,第二步 在app.json中 和 "window"同级 下写上 "tabBar":{ "list":[ {tabBar的对应属性} ] }
// tabBar的配置 1,必须要有两个tabBar页面, 2,在"pages"中必须把tabBar页面放上面才会显示
"tabBar":{
"color": "#fff", //(可以不用写) 设置未选中时文字的颜色,,不写默认值就是黑色
"selectedColor": "#fff", //(可以不用写) 设置选中时 文字的颜色,,不写默认值就是黑色
"backgroundColor": "#ccc", //(可以不用写) 设置tabBar的背景颜色,,不写有默认值是白色
"list":[
{
"pagePath": "", //地址
"text": "首页", //底部导航的文字内容 比如 首页
"iconPath": "", //未选中状态下的图标
"selectedIconPath": "" //选中时显示的图标
},
{
"pagePath":"", //地址
"text": "购物车", //底部导航的文字内容 比如 首页
"iconPath": "", //未选中状态下的图标
"selectedIconPath": "" //选中时显示的图标
},
{
"pagePath":"", //地址
"text": "我的", //底部导航的文字内容 比如 首页
"iconPath": "", //未选中状态下的图标
"selectedIconPath": "" //选中时显示的图标
},
]
}