Skip to content

Commit b597d50

Browse files
committed
Rename
1 parent 680cad8 commit b597d50

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ const VirtualList = Vue.component(NAME, {
130130
// ref element is definitely available here.
131131
const { root } = this.$refs
132132
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()
135135
const offsetShape = root[this.isHorizontal ? 'clientWidth' : 'clientHeight']
136136
const scrollShape = root[this.isHorizontal ? 'scrollWidth' : 'scrollHeight']
137137

138-
if (isUpper && !!this.dataSources.length && offset - this.upperThreshold <= 0) {
138+
if (isFront && !!this.dataSources.length && offset - this.upperThreshold <= 0) {
139139
this.$emit('totop', evt, range)
140-
} else if (isLower && offset + offsetShape + this.lowerThreshold >= scrollShape) {
140+
} else if (isBehind && offset + offsetShape + this.lowerThreshold >= scrollShape) {
141141
this.$emit('tobottom', evt, range)
142142
} else {
143143
this.$emit('scroll', evt, range)

src/virtual.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ export default class Virtual {
6060
return range
6161
}
6262

63-
isLower () {
63+
isBehind () {
6464
return this.direction === DIRECTION_TYPE.BEHIND
6565
}
6666

67-
isUpper () {
67+
isFront () {
6868
return this.direction === DIRECTION_TYPE.FRONT
6969
}
7070

0 commit comments

Comments
 (0)