Skip to content

Commit d587f68

Browse files
committed
Fixed start error when bench is large than remian. #37
1 parent 13b39cd commit d587f68

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@
342342
this.$nextTick(this.setScrollTop.bind(this, this.alter === 'offset'
343343
? this.offset : this.variable
344344
? this.getVarOffset(zone.isLast ? delta.total : zone.start)
345-
: zone.isLast ? delta.total * this.size : zone.start * this.size)
345+
: zone.isLast && (delta.total - calcstart <= this.remain)
346+
? delta.total * this.size : calcstart * this.size)
346347
)
347348
}
348349

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-virtual-scroll-list",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "A vue (2.x) component that support big data list with high scroll performance.",
55
"main": "index.js",
66
"files": [

0 commit comments

Comments
 (0)