We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
你好,请使用下面的链接创建 issue 以帮助我们更快的排查问题,不规范的 issue 会被关闭,感谢配合。
http://vant-contrib.gitee.io/vant-issue-generater?repo=VantWeapp
issue 的库:VantWeapp Issue 类型:bug Issue 标题:当scroll-view允许下拉刷新的时候van-sticky吸顶失效 设备:小程序
当scroll-view移除refresher-enabled时是正常的,会吸顶。通过排查发现将offsetTop设置成event.detail.scrollTop。可以达到吸顶的效果,但是这个方式疯狂的setData。会造成页面卡顿。吸顶跳跃。效果不理想
我是吸顶的标题
js onScroll(event){ wx.createSelectorQuery() .select('#scroller') .boundingClientRect((res) => { console.log("scroller",res,event.detail.scrollTop); this.setData({ scrollTop: event.detail.scrollTop, offsetTop: res.top, }); }) .exec(); },
The text was updated successfully, but these errors were encountered:
该issue 在vant-weapp2.0 解决
Sorry, something went wrong.
补充一点。实测下来,scroll-view 里面开启下拉刷新 里面的元素的postion会无效 不管是fixed/还是sticky 这可能是官方的一个bug,社区也有讨论,如有这种场景尝试页面级别的下拉刷新。
No branches or pull requests
你好,请使用下面的链接创建 issue 以帮助我们更快的排查问题,不规范的 issue 会被关闭,感谢配合。
http://vant-contrib.gitee.io/vant-issue-generater?repo=VantWeapp
issue 的库:VantWeapp
Issue 类型:bug
Issue 标题:当scroll-view允许下拉刷新的时候van-sticky吸顶失效
设备:小程序
当scroll-view移除refresher-enabled时是正常的,会吸顶。通过排查发现将offsetTop设置成event.detail.scrollTop。可以达到吸顶的效果,但是这个方式疯狂的setData。会造成页面卡顿。吸顶跳跃。效果不理想
我是吸顶的标题
js
onScroll(event){
wx.createSelectorQuery()
.select('#scroller')
.boundingClientRect((res) => {
console.log("scroller",res,event.detail.scrollTop);
this.setData({
scrollTop: event.detail.scrollTop,
offsetTop: res.top,
});
})
.exec();
},
The text was updated successfully, but these errors were encountered: