Skip to content
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

Dialog 关闭后 没有移出 body上的 nut-overflow-hidden #2211

Closed
eiinu opened this issue Mar 30, 2023 Discussed in #2201 · 1 comment · Fixed by #2241
Closed

Dialog 关闭后 没有移出 body上的 nut-overflow-hidden #2211

eiinu opened this issue Mar 30, 2023 Discussed in #2201 · 1 comment · Fixed by #2241
Milestone

Comments

@eiinu
Copy link
Member

eiinu commented Mar 30, 2023

Discussed in #2201

Originally posted by xiaobei66 March 24, 2023
大佬们,Dialog开启后关闭就会干掉滚动条,检查一看 body上有一个开启时添加的 .nut-overflow-hidden类名 ,想要关掉时移出 但是不可能每个页面都去写一下吧 ,所以 怎么解决啊 ? 在线等!class="nut-overflow-hidden"

@Formulaaa
Copy link
Contributor

我也有这个问题,暂时的解决办法就是自己再封装一个函数,在beforeClose的时候移除那个类。看了一下源码,那个地方逻辑应该有问题,但是PR成本太高,搞了半天也没弄好。这块还有一个问题就是没法触发onCLosed函数,也是源码那块先unmount了,之后就没办法触发这个时间了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants