We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83ee782 commit 24fe6f4Copy full SHA for 24fe6f4
src/index.js
@@ -60,9 +60,21 @@ const VirtualList = Vue.component('virtual-list', {
60
}
61
},
62
63
- // set back offset when awake from keep-alive
64
activated () {
+ // set back offset when awake from keep-alive
65
this.scrollToOffset(this.virtual.offset)
66
+
67
+ if (this.pageMode) {
68
+ document.addEventListener('scroll', this.onScroll, {
69
+ passive: false,
70
+ })
71
+ }
72
+ },
73
74
+ deactivated() {
75
76
+ document.removeEventListener('scroll', this.onScroll)
77
78
79
80
mounted () {
0 commit comments