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

[t-popup] prevent-scroll-through问题 #2990

Open
tankle0 opened this issue Jul 18, 2024 · 3 comments
Open

[t-popup] prevent-scroll-through问题 #2990

tankle0 opened this issue Jul 18, 2024 · 3 comments

Comments

@tankle0
Copy link

tankle0 commented Jul 18, 2024

tdesign-miniprogram 版本

1.4.4

重现链接

重现步骤

<t-popup using-custom-navbar="{{true}}" prevent-scroll-through="{{false}}" closeOnOverlayClick="{{closeOnOverlayClick}}" >
页面使用了自定义导航栏,t-popup 写在了子组件内,prevent-scroll-through默认为true时,无法覆盖导航栏,导致导航栏展示出来,可以点击返回;
999

但是设置prevent-scroll-through为false,又会出现下面图片上的问题,无法覆盖页面,是不是因为t-popup在子组件内,导致层级不够?
888

期望结果

子组件内使用t-popup设置using-custom-navbar可以覆盖导航栏,或者prevent-scroll-through设置为false后正常覆盖页面

实际结果

子组件内使用t-popup设置using-custom-navbar无法覆盖导航栏;prevent-scroll-through设置为false后无法正常覆盖页面

基础库版本

3.4.10

补充说明

page内upload组件,点击upload组件打开弹窗(弹窗使用t-popup,在upload组件内,问题出现在这里),可以选择拍照或者相册,选择图片后上传,将上传后返回的url传递给page

https://github.com/user-attachments/assets/fab0e390-2a9e-43a7-b010-6e568710c1e0
又出现一个问题,t-popup组件被scrollview 包裹,页面不滚动时是正常的,内容超出滚动时就不行了

27.mp4
Copy link
Contributor

👋 @tankle0,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@tankle0
Copy link
Author

tankle0 commented Jul 19, 2024

很奇怪,定位失败的时候弹窗覆盖正常,定位成功就不行了,视频上我故意把获取位置关了就展示正常了

25.mp4

@tankle0
Copy link
Author

tankle0 commented Jul 20, 2024

找到原因了,只要scroll-view包裹t-popup组件,会导致t-popup蒙层无法覆盖全屏

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

No branches or pull requests

1 participant