修改app.json,加上tarBar元素。
{ "pages":[ "pages/buy/buy", "pages/sell/sell", "pages/report/report" ], "window":{ "backgroundTextStyle":"light", "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "摆摊小账本", "navigationBarTextStyle":"black" }, "tabBar": { "list": [ { "pagePath": "pages/buy/buy", "text": "进货" }, { "pagePath": "pages/sell/sell", "text": "销售" } , { "pagePath": "pages/report/report", "text": "报告老板" } ] } }
效果: