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

[List] 当上级节点设置了overflow-x: hidden时, list组件的scroll方法无法触发 #964

Closed
LoopZhou opened this issue Jul 17, 2023 · 6 comments
Labels
question Further information is requested

Comments

@LoopZhou
Copy link
Collaborator

tdesign-mobile-vue 版本

1.0.0-rc.3

重现链接

https://stackblitz.com/edit/wujtgd?file=src%2Fdemo.vue

重现步骤

如示例,在test-dom或者 test-dom2设置了overflow-x 样式后, list组件的scroll方法无法触发

期望结果

overflow-x不影响list的scroll方法

实际结果

设置了overflow-x会影响list的scroll方法执行

框架版本

Vue(3.2.0)

浏览器版本

Chrome(99.0.4844.51)

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

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

@anlyyao anlyyao added the bug Something isn't working label Jul 17, 2023
@yaogengzhu
Copy link
Collaborator

import '../../_common/style/mobile/components/list/_index.less';

这个重构漏了样式改造吗?

@anlyyao
Copy link
Collaborator

anlyyao commented Jul 24, 2023

import '../../_common/style/mobile/components/list/_index.less';

这个重构漏了样式改造吗?

list 组件没有新视觉~~囧

@anlyyao anlyyao added question Further information is requested and removed bug Something isn't working labels Jul 24, 2023
@anlyyao
Copy link
Collaborator

anlyyao commented Jul 24, 2023

@LoopZhou 当元素指定 overflow-x: hidden 样式时,此时该元素的 overflow-y 不在是默认值 visible,而是被浏览器设置为 auto,所以会导致 List 组件无法判断正确的滚动容器。有一个解决方案是给当前元素添加 height: 100% 样式。 【欢迎一起讨论】

@ccccpj
Copy link
Collaborator

ccccpj commented Jul 26, 2023

@LoopZhou 当元素指定 overflow-x: hidden 样式时,此时该元素的 overflow-y 不在是默认值 visible,而是被浏览器设置为 auto,所以会导致 List 组件无法判断正确的滚动容器。有一个解决方案是给当前元素添加 height: 100% 样式。 【欢迎一起讨论】

在 父级样式添加 overscroll-behavior: contain; 可以解决这个问题

@LoopZhou
Copy link
Collaborator Author

尝试通过配置height值可解决,感谢

@anlyyao anlyyao closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants