소스 검색

:recycle: adjusting intersection setting

tags/0.9.0
J 4 년 전
부모
커밋
3374d447b2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      vue-theme/src/pages/list.vue

+ 2
- 2
vue-theme/src/pages/list.vue 파일 보기

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

Loading…
취소
저장