Skip to content

Commit 87d5f82

Browse files
committed
Build version 2.1.3
1 parent 0416d91 commit 87d5f82

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Root component:
9595
Item component:
9696
```vue
9797
<template>
98-
<div>{{ source.text }} - {{ otherPropValue }}</div>
98+
<div>{{ index }} - {{ source.text }} - {{ otherPropValue }}</div>
9999
</template>
100100
101101
<script>

dist/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-virtual-scroll-list v2.1.2
2+
* vue-virtual-scroll-list v2.1.3
33
* open source under the MIT license
44
* https://github.com/tangbc/vue-virtual-scroll-list#readme
55
*/
@@ -735,7 +735,7 @@
735735
var clientSize = this.getClientSize();
736736
var scrollSize = this.getScrollSize(); // iOS scroll-spring-back behavior will make direction mistake
737737

738-
if (offset + clientSize > scrollSize || !scrollSize) {
738+
if (offset < 0 || offset + clientSize > scrollSize || !scrollSize) {
739739
return;
740740
}
741741

@@ -744,12 +744,12 @@
744744
},
745745
// emit event in special position
746746
emitEvent: function emitEvent(offset, clientSize, scrollSize, evt) {
747+
this.$emit('scroll', evt, this.virtual.getRange());
748+
747749
if (this.virtual.isFront() && !!this.dataSources.length && offset - this.topThreshold <= 0) {
748750
this.$emit('totop');
749751
} else if (this.virtual.isBehind() && offset + clientSize + this.bottomThreshold >= scrollSize) {
750752
this.$emit('tobottom');
751-
} else {
752-
this.$emit('scroll', evt, this.virtual.getRange());
753753
}
754754
},
755755
// get the real render slots based on range data

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": "2.1.2",
3+
"version": "2.1.3",
44
"description": "A vue component support big amount data list with high scroll performance.",
55
"main": "dist/index.js",
66
"files": [

0 commit comments

Comments
 (0)