fix(List): incorrect reaching edge condition when direction is up (#5439)

This commit is contained in:
孙翛然 2020-01-01 22:03:58 +08:00 committed by neverland
parent fb06bcaa75
commit ae20752d7a

View File

@ -95,7 +95,7 @@ export default createComponent({
const placeholderRect = this.$refs.placeholder.getBoundingClientRect();
if (direction === 'up') {
isReachEdge = placeholderRect.top - scrollerRect.top <= offset;
isReachEdge = scrollerRect.top - placeholderRect.top <= offset;
} else {
isReachEdge = placeholderRect.bottom - scrollerRect.bottom <= offset;
}