File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ export default {
84
84
} ,
85
85
86
86
methods : {
87
-
88
87
getListenerTarget ( ) {
89
88
let target = ScrollParent ( this . $el )
90
89
if ( target === window . document . documentElement ) {
@@ -95,7 +94,7 @@ export default {
95
94
96
95
getScroll ( ) {
97
96
const el = this . $el
98
- let scroll
97
+ let scrollState
99
98
100
99
if ( this . pageMode ) {
101
100
const rect = el . getBoundingClientRect ( )
@@ -108,22 +107,18 @@ export default {
108
107
if ( top + height > rect . height ) {
109
108
height = rect . height - top
110
109
}
111
- scroll = {
112
- top : top ,
110
+ scrollState = {
111
+ top,
113
112
bottom : top + height ,
114
113
}
115
114
} else {
116
- scroll = {
115
+ scrollState = {
117
116
top : el . scrollTop ,
118
117
bottom : el . scrollTop + el . clientHeight ,
119
118
}
120
119
}
121
120
122
- if ( scroll . bottom >= 0 && scroll . top <= scroll . bottom ) {
123
- return scroll
124
- } else {
125
- return null
126
- }
121
+ return scrollState
127
122
} ,
128
123
129
124
applyPageMode ( ) {
You can’t perform that action at this time.
0 commit comments