Przeglądaj źródła

:recycle: different settings for intersection

tags/0.9.0
J 4 lat temu
rodzic
commit
22f52461c2
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1
    2
      vue-theme/src/pages/list.vue

+ 1
- 2
vue-theme/src/pages/list.vue Wyświetl plik

157
                 })
157
                 })
158
             }
158
             }
159
             const settings = {
159
             const settings = {
160
-                root: footerEl,
161
-                rootMargin: '-100px 0px 0px 0px',
162
                 threshold: 0.80
160
                 threshold: 0.80
163
             }
161
             }
164
             this.observer = new IntersectionObserver(onIntersect, settings)
162
             this.observer = new IntersectionObserver(onIntersect, settings)
165
             this.observer['_for_type'] = this.type
163
             this.observer['_for_type'] = this.type
164
+            this.observer.observe(footerEl)
166
             console.log(this.observer)
165
             console.log(this.observer)
167
         },
166
         },
168
         unsetIntersectionLoader(type) {
167
         unsetIntersectionLoader(type) {

Ładowanie…
Anuluj
Zapisz