|
|
@@ -75,6 +75,7 @@ export default {
|
|
75
|
75
|
methods: {
|
|
76
|
76
|
loadMorePosts() {
|
|
77
|
77
|
this.page++
|
|
|
78
|
+ console.log('loading...')
|
|
78
|
79
|
this.getPosts(false)
|
|
79
|
80
|
},
|
|
80
|
81
|
getPosts(clear) {
|
|
|
@@ -199,9 +200,8 @@ export default {
|
|
199
|
200
|
},
|
|
200
|
201
|
created() {
|
|
201
|
202
|
window.addEventListener("load", e => {
|
|
202
|
|
- const footerEl = document.querySelector(".page--list article footer")
|
|
|
203
|
+ const footerEl = document.querySelector(".sub-footer")
|
|
203
|
204
|
const observer = new IntersectionObserver(this.loadMorePosts, {
|
|
204
|
|
- root: null,
|
|
205
|
205
|
rootMargin: "0px",
|
|
206
|
206
|
})
|
|
207
|
207
|
observer.observe(footerEl)
|