1. 程式人生 > >小程式切換tab時tab上文字顏色不正常問題

小程式切換tab時tab上文字顏色不正常問題

問題原因:小程式json中tab的顏色只支援二進位制


程式碼如下:

關鍵程式碼為;

"backgroundColor": "#ffffff", "color": "#000000", "selectedColor": "#C62724"

json;

"tabBar": { "list": [ { "pagePath": "pages/shouye/shouye", "text": "首頁", "iconPath"
: "/images/shouye_gray.png", "selectedIconPath": "/images/shouye_red.png" }, { "pagePath": "pages/fenlei/fenlei", "text": "分類", "iconPath": "/images/fenlei_gary.png", "selectedIconPath": "/images/feilei_red.png" }, { "pagePath"
: "pages/dianpu/dianpu", "text": "店鋪" }, { "pagePath": "pages/gouwuche/gouwuche", "text": "購物車", "iconPath": "/images/car_gray.png", "selectedIconPath": "/images/car_red.png" }, { "pagePath"
: "pages/my/my", "text": "我的", "iconPath": "/images/wode_gray.png", "selectedIconPath": "/images/wode_red.png" } ], "backgroundColor": "#ffffff", "color": "#000000", "selectedColor": "#C62724" }