mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(List): incorrect reaching edge condition when direction is up (#5439)
This commit is contained in:
parent
fb06bcaa75
commit
ae20752d7a
@ -95,7 +95,7 @@ export default createComponent({
|
|||||||
const placeholderRect = this.$refs.placeholder.getBoundingClientRect();
|
const placeholderRect = this.$refs.placeholder.getBoundingClientRect();
|
||||||
|
|
||||||
if (direction === 'up') {
|
if (direction === 'up') {
|
||||||
isReachEdge = placeholderRect.top - scrollerRect.top <= offset;
|
isReachEdge = scrollerRect.top - placeholderRect.top <= offset;
|
||||||
} else {
|
} else {
|
||||||
isReachEdge = placeholderRect.bottom - scrollerRect.bottom <= offset;
|
isReachEdge = placeholderRect.bottom - scrollerRect.bottom <= offset;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user