微信小程序tabBar底部導航中文註解api,信小程序tabBar就是app底部的那個導航欄,能夠放1-5導航連接,這裏對微信小程序底部導航tabbar的中文解釋。 小程序tabBar配置代碼註解{ "pages":[ "pages/index/index", "pages/detail/detail" ], "window":{ "navigationBarTitleText": "TabBar", "navigationBarBackgroundColor": "#F60", "navigationBarTextStyle": "white" }, //tabBar注意是B是大寫,有朋友提問運行時tab沒出現,檢查是否是這裏手誤 "tabBar":{ //文檔指出color是必填項,其實可爲空,不重寫color就是深灰,樣式更統一 "color": "#ddd", //一樣,文檔指出selectedColor是必填項,不過selectedColor有必要重寫,區分當前項與普通項 "selectedColor": "#3cc51f", //一樣,文檔指出color是必填項,其實可爲空,不重寫backgroundColor就是淺灰,樣式更統一。 "backgroundColor": "#fff", //borderStyle,不寫默認就是黑,那就黑好了,white的話,會少一條分隔線,跟頁面混在一塊兒了 "borderStyle":"black", "list":[{ "pagePath":"pages/index/index", //iconPath圖標是非必填,只是tab欄會變矮,天然selectedIconPath也可不寫 "iconPath":"image/icon_API.png", "selectedIconPath":"image/icon_API_HL.png", "text":"index" },{ "pagePath":"pages/detail/detail", "iconPath":"image/icon_component.png", "selectedIconPath":"image/icon_component_HL.png", "text":"detail" }] } } 小程序tabBar參數說明若是咱們的小程序是一個多 tab 應用(客戶端窗口的底部有tab欄能夠切換頁面),那麼咱們能夠經過 tabBar 配置項指定 tab 欄的表現,以及 tab 切換時顯示的對應頁面。小程序 tabBar 是一個數組,只能配置最少2個、最多5個 tab,tab 按數組的順序排序。微信小程序 屬性說明:api
其中 list 接受一個數組,數組中的每一個項都是一個對象,其屬性值以下:數組
|