在app.json中配置
{ "pages": [ "pages/index/index", "pages/staging/staging", "pages/shopcar/shopcar", "pages/find/find", "pages/my/my" ], "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "*****", "navigationBarTextStyle": "black" }, "tabBar": { "backgroundColor": "#eee", "color": "#595757", "selectedColor": "#a53533", "list": [ { "iconPath": "img/leaseOn.png", "selectedIconPath": "img/leaseOn.png", "pagePath": "pages/index/index", "text": "租赁" }, { "iconPath": "img/staging.png", "selectedIconPath": "img/stagingOn.png", "pagePath": "pages/staging/staging", "text": "分期" }, { "iconPath": "img/find.png", "selectedIconPath": "img/findOn.png", "pagePath": "pages/find/find", "text": "发现" }, { "iconPath": "img/shopcar.png", "selectedIconPath": "img/shopcarOn.png", "pagePath": "pages/shopcar/shopcar", "text": "购物车" }, { "iconPath": "img/my.png", "selectedIconPath": "img/myOn.png", "pagePath": "pages/my/my", "text": "我的" } ] } }
color //默认颜色
selectedColor //选中颜色
iconPath //默认图片路径
selectedIconPath //选中图片路径
pagePath //点击跳页路径
text //导航文字