553828497@qq.com
553828497@qq.com
  • 发布:2020-03-28 13:49
  • 更新:2020-06-12 14:25
  • 阅读:566

使用官方提供的midButton属性在tabbar上放置中间凸起的图片,在微信小程序无效,在app上正常

分类:uni-app

下图第一张图是app,第二张图是微信小程序。难不成使用官方提供的属性,无法在微信小程序上实现中间凸起的效果吗?

"tabBar": {  
        "color": "#7a7e83",  
        "selectedColor": "#FF3e32",  
        "backgroundColor": "#ffffff",  
        "borderStyle": "black",  
        "midButton": {  
            "width":"64px",  
            "height":"66px",  
            "iconWidth":"45.5px",  
            "iconPath": "static/images/tabbar_vip.png"  
        },  
        "list": [{  
                "pagePath": "pages/tabbar/home",  
                "text": "首页",  
                "iconPath": "static/images/home_unselect.png",  
                "selectedIconPath": "static/images/home_select.png"  
            },  
            {  
                "pagePath": "pages/tabbar/activity",  
                "text": "活动",  
                "iconPath": "static/images/activity_unselect.png",  
                "selectedIconPath": "static/images/activity_select.png"  
            },  
            // #ifndef APP-PLUS    
            {  
                "pagePath": "pages/tabbar/vip",  
                "text": "vip",  
                "iconPath": "static/images/tabbar_vip.png",  
                "selectedIconPath": "static/images/tabbar_vip.png"  
            },  
             // #endif    
            {  
                "pagePath": "pages/tabbar/find",  
                "text": "发现",  
                "iconPath": "static/images/find_unselect.png",  
                "selectedIconPath": "static/images/find_select.png"  
            },  
            {  
                "pagePath": "pages/tabbar/my",  
                "text": "我的",  
                "iconPath": "static/images/my_unselect.png",  
                "selectedIconPath": "static/images/my_select.png"  
            }  
        ]  
    },
2020-03-28 13:49 负责人:无 分享
已邀请:
1606726660@qq.com

1606726660@qq.com

人家文档上不是说了 仅app支持

553828497@qq.com

553828497@qq.com (作者)

没有人回复吗? midButton是不是在微信小程序上没有效果?

561774@qq.com

561774@qq.com

这里加个 ifdef app的判断吧,小程序写这类按钮应该问题不大的,往上放控件就行了。

要回复问题请先登录注册