肖肖二呐
肖肖二呐
  • 发布:2025-09-04 15:13
  • 更新:2025-09-04 16:35
  • 阅读:53

【报Bug】鸿蒙端展示tabbar时,配置的midbutton展示的与app端不一致

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 12.5.1

HBuilderX类型: 正式

HBuilderX版本号: 4.66

手机系统: 全部

手机厂商: 华为

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

测试过的手机:

iphone11,nova14pro

示例代码:

tabbar配置项

"tabBar": {  
        "custom": false,  
        "color": "#333333",  
        "selectedColor": "#7554FA",  
        "backgroundColor": "#fff",  
        "iconWidth": "20px",  

        "list": [  
            //业务员 start  
            {  
                "pagePath": "pages/tab-bar/salesman/index",  
                "iconPath": "/static/images/tab-bar/index.png",  
                "selectedIconPath": "/static/images/tab-bar/index_active.png",  
                "text": "首页"  
            }, {  
                "pagePath": "pages/tab-bar/cart/index",  
                "iconPath": "/static/images/tab-bar/shopping_cart.png",  
                "selectedIconPath": "/static/images/tab-bar//shopping_cart_active.png",  
                "text": "购物车"  
            },  
            {  
                "pagePath": "pages/tab-bar/analysis/index",  
                "iconPath": "/static/images/tab-bar/analysis.png",  
                "selectedIconPath": "/static/images/tab-bar/analysis_active.png",  
                "text": "数据"  
            },  
            {  
                "pagePath": "pages/tab-bar/main/index",  
                "iconPath": "/static/images/tab-bar/center.png",  
                "selectedIconPath": "/static/images/tab-bar/center_active.png",  
                "text": "我的"  
            },  
            {  
                "pagePath": "",  
                "iconPath": "",  
                "selectedIconPath": "",  
                "text": "",  
                "visible": false  

            },  
            {  
                "pagePath": "",  
                "iconPath": "",  
                "selectedIconPath": "",  
                "text": "",  
                "visible": false  
            }  

        ],  
        "midButton": {  
            "width": "80px",  
            "height": "50px",  
            "text": "",  
            "iconPath": "/static/images/tab-bar/yc-init.png",  
            "iconWidth": "50px",  
            "backgroundImage": ""  
        }  
    }

操作步骤:

登录进入首页

预期结果:

进入首页时鸿蒙tabbar,midButton展示位置居中,除去隐藏项排在第三项

实际结果:

进入首页时鸿蒙tabbar,midButton展示位置不居中,排在第四项,没有出去隐藏项

bug描述:

当有6个tabbar的元素项时,配置两个为隐藏,只保留4个展示,设置midbutton时,在ios,安卓,h5端时,midbutton排列在第三位。在鸿蒙端排列在第四位,没有排除掉隐藏的两个tabbar选项。(显示为云采的为midbutton)

2025-09-04 15:13 负责人:无 分享
已邀请:

最佳回复

DCloud_UNI_yuhe

DCloud_UNI_yuhe

临时解决方案: 将下方的 har 包 放在 harmony-configs/libs 目录下,删除unpackage之后重新运行

DCloud_UNI_yuhe

DCloud_UNI_yuhe

我看一下这个问题的,感谢反馈

要回复问题请先登录注册