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

van-sticky内嵌scrollview吸顶超出范围 #5717

Closed
XXiao32313322 opened this issue Feb 2, 2024 · 1 comment
Closed

van-sticky内嵌scrollview吸顶超出范围 #5717

XXiao32313322 opened this issue Feb 2, 2024 · 1 comment

Comments

@XXiao32313322
Copy link

重现链接

Vant Weapp 版本

1.11.4

描述一下你遇到的问题。

van-sticky 组件在微信小程序中与scrollview联合使用出现bug:
当一个页面左右两部分都为scrollview时,右边的scrollview中有一个元素需要在scrollview区域内坐上吸顶操作,当将右边的滚动页面向上滑动时,van-sticky 包裹的元素跳出了右边的scrollview的容器范围,后来我改动了vant的源码,加上offset-left的属性,问题就可以解决了,所以希望官方在van-sticky 组件上和scrollview内嵌使用时能加一个offset-left的属性或者offset-right的属性,以此能够适应广大开发者更多的开发需求

重现步骤

设备/浏览器

小程序开发者工具

@johnsonwong666
Copy link
Collaborator

可以监听scroll事件,isFixed的时候,去设置left值。

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

No branches or pull requests

2 participants