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

当抽屉打开时,body有滚动条时可以滚动 #73

Closed
YFAnt opened this issue Dec 24, 2021 · 7 comments · Fixed by #98
Closed

当抽屉打开时,body有滚动条时可以滚动 #73

YFAnt opened this issue Dec 24, 2021 · 7 comments · Fixed by #98
Labels
🏃🏻 in progress someone is handling

Comments

@YFAnt
Copy link
Contributor

YFAnt commented Dec 24, 2021

版本:
0.31.0

demo:
https://tdesign.tencent.com/vue/components/drawer

步骤:
点击第一个可查看的抽屉,鼠标滚轮可以滚动底部遮照部分

@YFAnt
Copy link
Contributor Author

YFAnt commented Dec 24, 2021

我在src/drawer/drawer.tsx 做了如下修改 应该可以解决上面问题
image其实这个地方应该用正则匹配设置className,这样没有兼容性问题,
但是我没看到公共函数在哪写,由于涉及面太广,还得去另外一个库里面加入类名,请作者自己修复吧

@chaishi
Copy link
Collaborator

chaishi commented Dec 24, 2021

理解下来应该防止滚动穿透的功能,Dialog 有这个功能,Drawer 应该是漏了

Drawer 后续新增 API preventScrollThrough: boolean,用于设置是否防止滚动穿透,Drawer 的实现可参考 Loading。

此处建议定义一个公共函数处理

@chaishi
Copy link
Collaborator

chaishi commented Dec 24, 2021

image

Loading 组件 和 Dialog 组件已经实现 防止滚动穿透,Drawer 也需要支持,此处考虑独立一个函数,统一处理

@chaishi
Copy link
Collaborator

chaishi commented Dec 24, 2021

处理方式参考 Loading 组件

image

@chaishi
Copy link
Collaborator

chaishi commented Dec 24, 2021

@caoML 跟进中

@chaishi chaishi added the 🏃🏻 in progress someone is handling label Dec 24, 2021
@YFAnt
Copy link
Contributor Author

YFAnt commented Dec 24, 2021

可以的 :)

@xiaosansiji
Copy link
Collaborator

已在 0.33.0 版本中修复

start940315 referenced this issue in start940315/tdesign-vue Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏃🏻 in progress someone is handling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants