我們可以通過app.json對微信小程序進(jìn)行全局配置夷陋,window用于設(shè)置小程序的狀態(tài)欄胰锌、導(dǎo)航條、標(biāo)題酬土、窗口背景色格带,全局配置的設(shè)置用于整個小程序的頁面,但是有時想改變子級頁面的配置內(nèi)容叽唱,那就在當(dāng)前頁的json文件里面直接設(shè)置。
app.json
"window": {
"navigationBarBackgroundColor": "#d92636",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "跨境電商",
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light",
},
全局配置下的標(biāo)題
search.json
{
"navigationBarBackgroundColor": "#f6f6fa",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"搜索"
}
搜索頁面下配置的標(biāo)題