File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -130,14 +130,14 @@ const VirtualList = Vue.component(NAME, {
130
130
// ref element is definitely available here.
131
131
const { root } = this . $refs
132
132
const range = this . virtual . getRange ( )
133
- const isLower = this . virtual . isLower ( )
134
- const isUpper = this . virtual . isUpper ( )
133
+ const isFront = this . virtual . isFront ( )
134
+ const isBehind = this . virtual . isBehind ( )
135
135
const offsetShape = root [ this . isHorizontal ? 'clientWidth' : 'clientHeight' ]
136
136
const scrollShape = root [ this . isHorizontal ? 'scrollWidth' : 'scrollHeight' ]
137
137
138
- if ( isUpper && ! ! this . dataSources . length && offset - this . upperThreshold <= 0 ) {
138
+ if ( isFront && ! ! this . dataSources . length && offset - this . upperThreshold <= 0 ) {
139
139
this . $emit ( 'totop' , evt , range )
140
- } else if ( isLower && offset + offsetShape + this . lowerThreshold >= scrollShape ) {
140
+ } else if ( isBehind && offset + offsetShape + this . lowerThreshold >= scrollShape ) {
141
141
this . $emit ( 'tobottom' , evt , range )
142
142
} else {
143
143
this . $emit ( 'scroll' , evt , range )
Original file line number Diff line number Diff line change @@ -60,11 +60,11 @@ export default class Virtual {
60
60
return range
61
61
}
62
62
63
- isLower ( ) {
63
+ isBehind ( ) {
64
64
return this . direction === DIRECTION_TYPE . BEHIND
65
65
}
66
66
67
- isUpper ( ) {
67
+ isFront ( ) {
68
68
return this . direction === DIRECTION_TYPE . FRONT
69
69
}
70
70
You can’t perform that action at this time.
0 commit comments