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

PullRefresh 将判断 reachTop 的逻辑移动到组件外部 #92

Closed
ickg5 opened this issue Nov 11, 2021 · 3 comments
Closed

PullRefresh 将判断 reachTop 的逻辑移动到组件外部 #92

ickg5 opened this issue Nov 11, 2021 · 3 comments

Comments

@ickg5
Copy link
Contributor

ickg5 commented Nov 11, 2021

在 PullRefresh 组件内部采用 Selector API 获得父滚动元素的 scrollTop 值会带来下拉卡顿的性能问题。因此需要在 PullRefresh 组件外部判断 scrollTop 值,在页面中使用 usePageScroll() 钩子获得 scrollTop 值,在 ScrollView 组件内监听 onScroll 事件获得 scrollTop 值。

@ickg5
Copy link
Contributor Author

ickg5 commented Nov 11, 2021

#74

@ickg5
Copy link
Contributor Author

ickg5 commented Nov 11, 2021

具体使用方式参考文档:https://taroify.gitee.io/taroify.com/components/pull-refresh/

@ickg5 ickg5 changed the title PullRefresh 将调整 reachTop 的逻辑调整到外部 PullRefresh 将判断 reachTop 的逻辑移动到组件外部 Nov 11, 2021
@ickg5
Copy link
Contributor Author

ickg5 commented Nov 11, 2021

#95

@ickg5 ickg5 closed this as completed Nov 11, 2021
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

1 participant