jd-opensource / jd-opensource/taro-ui

AtTabBar闪烁以及如何得到AtTabBar的高度

Open
#942 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

我目前在使用 `AtTabBar` ,当我不设置 `fixed` 时,我通过控制每个 `tab` 页面的 `display` 为 `none` 或 `block` 来隐藏或显示页面。但我发现当页面内容过多时会导致 `AtTabBar` **闪烁**,我不知道这是 `bug` 还是什么原因,我发现 `issues` 中很多人也遇到此情况但没有得到解决。

因此我决定设置 `AtTabBar` 为 `fixed` 来解决这一问题,但应该如何计算 `AtTabBar` 的高度呢?因为我需要设置 `margin-bottom` 来防止 `AtTabBar` 遮挡内容,我计算得到的(对于我的应用的情况)高度是 `126rpx` ,但 `margin-bottom: 126px` 在 `ipad` 设备上内容区域出现了遮挡。

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.