diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/VirtualGrid.vue | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/components/VirtualGrid.vue b/src/components/VirtualGrid.vue index 959d4075..971dc587 100644 --- a/src/components/VirtualGrid.vue +++ b/src/components/VirtualGrid.vue @@ -109,12 +109,14 @@ export default { }, created() { + window.addEventListener('resize', this.onDocumentScroll) window.addEventListener('scroll', this.onDocumentScroll) }, mounted() { this.onDocumentScroll() }, beforeDestroy() { + window.removeEventListener('resize', this.onDocumentScroll) window.removeEventListener('scroll', this.onDocumentScroll) }, |