tangbc / vue-virtual-scroll-list

⚡️A vue component support big amount data list with high render performance and efficient.
https://tangbc.github.io/vue-virtual-scroll-list
MIT License
4.41k stars 592 forks source link

Fix remove useless "lastCalcIndex" judgment #407

Closed hooooope closed 1 year ago

hooooope commented 1 year ago

What kind of this PR? (check at least one)

Other information: 1.Since the scroll range of the container = [0 ~ scrollHeight-clientHeight], so lastCalcIndex is never equal to lastIndex. 2.When not scrolling to the bottom, paddingTop affects the position of the real element in the viewport, but paddingBottom does not 3.When scrolling to the bottom, paddingBottom = (last - end) * this.getEstimateSize(), since last - end = 0, so it is the right result