重慶潤雪科技有限公司(2008年至今),專注于網(wǎng)站建設(shè)、網(wǎng)站制作、網(wǎng)頁設(shè)計(jì)、小程序開發(fā)、公眾號(hào)開發(fā)、app開發(fā)的技術(shù)服務(wù)商。
每一步都修改到滿意后在付款,用價(jià)格、質(zhì)量、服務(wù)說明一切。
日期:2021-04-20 14:07 瀏覽量:1473
微信小程序開發(fā)小程序制作的時(shí)候tabbar菜單的配置非常簡單,只需要在小程序的根目錄的app.json里面進(jìn)行配置即可,代碼如下:
"tabBar": { "color": "#929699", "selectedColor": "#ff2e3d", "backgroundColor": "#ffffff", "borderStyle": "white", "list": [{ "pagePath": "pages/index/index", "text": "首頁", "iconPath": "/image/ico1.png", "selectedIconPath": "/image/ico1s.png" }, { "pagePath": "pages/user/index", "text": "我的", "iconPath": "/image/ico3.png", "selectedIconPath": "/image/ico3s.png" } ]
color:代表文字的顏色
selectedColor:代表當(dāng)前菜單被選中時(shí)候的顏色
backgroundColor:代表菜單的背景顏色
borderStyle:代表菜單上邊框邊的顏色
list:是菜單數(shù)組,最多可以設(shè)置5個(gè)
pagePath:當(dāng)點(diǎn)擊這個(gè)菜單時(shí)頁面的地址
text:這個(gè)菜單的文字
iconPath:這個(gè)菜單的圖標(biāo)地址
selectedIconPath:當(dāng)這個(gè)菜單被選中的時(shí)候的圖標(biāo)的地址