PAMapp/components/Ui/UiGoToTop.vue
@@ -18,7 +18,7 @@ created() { if (process.browser) { window.onscroll = () => { this.scrollFunction() }; document.body.addEventListener('scroll', this.scrollFunction); } } @@ -34,6 +34,10 @@ document.body.scrollTop = 0; document.documentElement.scrollTop = 0; } destroyed() { document.body.removeEventListener('scroll', this.scrollFunction); } } </script>