tabBar需要設置 app.json ,大小寫敏感,例如 pagePath 寫成 pagepath,則提示出錯。
以下爲app.json 內容:
{
"pages": [
"pages/index/index",
"pages/logs/logs",
"pages/newpage/newpage"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#ffcc00",
"navigationBarTitleText": "玄鐵重劍",
"navigationBarTextStyle": "black"
},
"tabBar": {
"backgroundcolor": "#000",
"list": [
{
"pagePath": "pages/index/index",
"text": "您好"
},
{
"pagePath": "pages/logs/logs",
"text": "郭靖"
},
{
"pagePath": "pages/newpage/newpage",
"text": "楊過"
}
]
}
}