Fix scrolling
This commit is contained in:
parent
d88f7ab1d9
commit
7845004840
|
@ -59,11 +59,8 @@
|
||||||
.then(() => {
|
.then(() => {
|
||||||
item._is_read = true
|
item._is_read = true
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
},
|
handleScroll() {
|
||||||
|
|
||||||
mounted() {
|
|
||||||
window.onscroll = () => {
|
|
||||||
// let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === document.documentElement.offsetHeight;
|
// let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === document.documentElement.offsetHeight;
|
||||||
let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === this.$el.offsetHeight + document.documentElement.offsetHeight + 20;
|
let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === this.$el.offsetHeight + document.documentElement.offsetHeight + 20;
|
||||||
if (bottomOfWindow) {
|
if (bottomOfWindow) {
|
||||||
|
@ -94,6 +91,14 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
window.addEventListener('scroll', this.handleScroll);
|
||||||
|
},
|
||||||
|
|
||||||
|
destroyed() {
|
||||||
|
window.removeEventListener('scroll', this.handleScroll);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user