From ff6cb58bffa6483e9349a7b32cc8838f2fa4f62d Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期五, 10 十二月 2021 18:35:13 +0800 Subject: [PATCH] TODO#132188 [顧問的滿意度評比分數與篩選功能先不顯示,但保戶依然可以進行滿意度評比與查看] --- PAMapp/components/Ui/UiGoToTop.vue | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/PAMapp/components/Ui/UiGoToTop.vue b/PAMapp/components/Ui/UiGoToTop.vue index 803cf3f..2fe1bd7 100644 --- a/PAMapp/components/Ui/UiGoToTop.vue +++ b/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> -- Gitblit v1.8.0