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

上拉加载,已经到达底部,却没有出现上拉加载 #110

Open
bldf opened this issue Mar 29, 2020 · 3 comments
Open

上拉加载,已经到达底部,却没有出现上拉加载 #110

bldf opened this issue Mar 29, 2020 · 3 comments

Comments

@bldf
Copy link

bldf commented Mar 29, 2020

上拉加载已经到底部了,却没有出现上拉加载

<PullToRefresh className="xm-pull-to-refresh" direction="up" refreshing={loading} onRefresh={onRefresh} indicator={{ activate: '松开立即刷新', release: <CircularProgress size={24} />, deactivate: '下拉可刷新', finish: '刷新完成' }} damping={150} > <div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>45</div> <div style={{ height: '2rem' }}>4589</div> </div> </PullToRefresh>

找到原因是 scrollTop 获取的是小数,而clientHeight 获取的是整数导致的

image

image
image
image

随着市面上各种高分屏,高DPI,都会出现这样的问题

@wotermelon
Copy link

怎么解

@angryreid
Copy link

Plz refrer below same issue with solution.
ant-design/ant-design-mobile#3521

@angryreid
Copy link

plz check my newly created repo for this iusseu at below links.
https://github.com/angryreid/PatchForAntdMBOLPullRefresh
Based on the origin contributors did not move on even some coder raised pr for it already

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

3 participants