tabbar文字和icon混用时,icon不垂直居中
- 需求的场景描述(希望解决的问题)
配置如下:
"tabBar": { color: '#333', selectedColor: '#FF6633', borderStyle: "#f8f8f8", backgroundColor: '#ffffff', "list": [{ "pagePath": "pages/index/main", "text": "首页" }, { "pagePath": "pages/ucenter/message/main", "text": "消息", }, { "pagePath": "pages/publish/main", "iconPath": "static/image/plus.png", }, { "pagePath": "pages/search/main", "text": '发现' }, { "pagePath": "pages/ucenter/index/main", "text": "我" }] } |
需要实现的效果如下:
而小程序的tabbar设置后的效果如下,当text属性没有的时候,iconPath图片不能垂直居中。
- 希望提供的能力
当tabbar配置 text不存在 而存在 iconPath 的时候,图片能自行垂直居中。
