马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
一、tabBar的构成身分
属性范例必填默认值形貌colorHexColor是tab 上的笔墨默认颜色,仅支持十六进制颜色selectedColorHexColor是tab 上的笔墨选中时的颜色,仅支持十六进制颜色backgroundColorHexColor是tab 的配景致,仅支持十六进制颜色borderStylestring否blacktabbar 上边框的颜色, 仅支持 black / whitelistArray是tab 的列表,详见 list 属性分析,最少 2 个、最多 5 个 tabpositionstring否bottomtabBar 的位置,仅支持 bottom / top二、list属性
属性范例必填分析pagePathstring是页面路径,必须在 pages 中先界说textstring是tab 上按钮笔墨iconPathstring否图片路径,icon 巨细限定为 40kb,发起尺寸为 81px * 81px,不支持网络图片。
当 position 为 top 时,不表现 icon。selectedIconPathstring否选中时的图片路径,icon 巨细限定为 40kb,发起尺寸为 81px * 81px,不支持网络图片。
当 position 为 top 时,不表现 icon。更多信息:全局设置 | 微信开放文档
三、示例
- "tabBar": {
- "selectedColor": "#f3514f",
- "color": "#666",
- "backgroundColor": "#efefef",
- "borderStyle":"black",
- "position":"bottom",
- "list": [
- {
- "text": "首页",
- "pagePath": "pages/index/index",
- "iconPath": "/image/first_page.png",
- "selectedIconPath": "/image/active_fp.png"
- },
- {
- "text": "分类",
- "pagePath": "pages/classify/classify",
- "iconPath": "/image/classify.png",
- "selectedIconPath": "/image/active_classify.png"
- },
- {
- "text": "购物车",
- "pagePath": "pages/car/car",
- "iconPath": "/image/buy_car.png",
- "selectedIconPath": "/image/active_car.png"
- },
- {
- "text": "我的",
- "pagePath": "pages/me/me",
- "iconPath": "/image/me.png",
- "selectedIconPath": "/image/active_me.png"
- }
- ]
- },
复制代码
|