-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当在有小程序原生Tabbar页面使用了Notify,会导致在没有Tabbar的页面的DropdownMenu显示不正确 #564
Labels
bug
Something isn't working
Comments
NickeyLin
changed the title
当在有小程序原生Tabbar页面使用了Notify,会导致在没有Tabbar的页面的DropdownMenu
当在有小程序原生Tabbar页面使用了Notify,会导致在没有Tabbar的页面的DropdownMenu显示不正确
Aug 29, 2023
我这也遇到同样的问题 |
zuolung
pushed a commit
that referenced
this issue
Feb 2, 2024
zuolung
pushed a commit
that referenced
this issue
Feb 4, 2024
This was referenced Feb 4, 2024
This was referenced Apr 30, 2024
This was referenced May 11, 2024
This was referenced May 24, 2024
This was referenced Jun 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个 Issue 涉及以下平台:
BUG 描述
当在有小程序Tabbar页面使用了Notify,会导致在没有Tabbar的页面的DropdownMenu显示不正确
复现步骤
<Notify id='vanNotify' />
DropdownMenu
期望结果
DropdownMenu
正常使用实际结果
DropdownMenu
下拉列表位置不正确截图
环境
@antmjs/vantui: 3.1.6
taro: 3.6.14
附加信息
此问题的原因应该是
common/utils.ts
中的getSystemInfoSync
方法导致。该方法使用静态变量缓存了第一次获取的系统信息。在Notify
组件useEffect
中调用了此方法,缓存了系统信息,然后DropdownMenu
组件通过此方法计算下拉列表位置。但是,在有
tabbar和没有
tabbar的页面的windowHeight
并不一样,所以,如果仍然使用第一次缓存的systemInfo
来计算下拉列表位置就不对了。The text was updated successfully, but these errors were encountered: