|
@@ -20,6 +20,12 @@ export default {
|
|
unmounted() {
|
|
unmounted() {
|
|
clearInterval(this.interval);
|
|
clearInterval(this.interval);
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ window.addEventListener("scroll", this.handleScroll);
|
|
|
|
+ },
|
|
|
|
+ destroyed() {
|
|
|
|
+ window.removeEventListener("scroll", this.handleScroll);
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
handleScroll() {
|
|
handleScroll() {
|
|
const scrollPosition = document.body.clientHeight + window.scrollY;
|
|
const scrollPosition = document.body.clientHeight + window.scrollY;
|