uni-app 启用 midButton 后 Tabbar 未等分

uni-app 启用 midButton 后 Tabbar 未等分

1 回复

更多关于uni-app 启用 midButton 后 Tabbar 未等分的实战教程也可以访问 https://www.itying.com/category-93-b0.html


在uni-app中启用midButton后,Tabbar未等分是常见问题,通常由midButton的宽度超出预期导致。默认情况下,midButton会占据更多空间,影响其他Tab项的布局。

解决方法:

  1. 调整midButton宽度:在pages.jsontabBar配置中,通过midButtonwidthheight属性明确设置尺寸,确保其宽度与其他Tab项相近。例如:
    "midButton": {
      "width": "50px",
      "height": "50px"
    }
回到顶部