tabBar,即底部标签栏。
按照官方文档,在app.json中增加了如下代码
"tabBar": { "color": "#a2a2a2", "selectedColor": "#3388ff", "borderStyle": "black", "backgroundColor": "#ffffff", "list": [{ "pagePath": "pages/detail/detail", "iconPath": "images/component_normal.png", "selectedIconPath": "images/component_selected.png", "text": "首页" },{ "pagePath": "pages/index/index", "iconPath": "images/API_normal.png", "selectedIconPath": "images/API_selected.png", "text": "列表" }] }
但是,编译百度小程序后确看不到底部标签栏,后来找了愿意,是因为list中的pagePath在,app.json中未定义,
所以把pagePath里的值改成pages里有的,在编译百度小程序就能显示tabBar了。