瀏覽代碼

fix(ScrollAndFetchHandler): scrolling no longer loaded new sets after Vue 3 migration

Kristian Vos 2 年之前
父節點
當前提交
8d759ea2ca
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      frontend/src/mixins/ScrollAndFetchHandler.vue

+ 3 - 3
frontend/src/mixins/ScrollAndFetchHandler.vue

@@ -1,8 +1,5 @@
 <script>
 export default {
-	setup() {
-		window.addEventListener("scroll", this.handleScroll);
-	},
 	data() {
 		return {
 			position: 1,
@@ -20,6 +17,9 @@ export default {
 			return this.maxPosition - 1;
 		}
 	},
+	mounted() {
+		window.addEventListener("scroll", this.handleScroll);
+	},
 	unmounted() {
 		clearInterval(this.interval);
 		window.removeEventListener("scroll", this.handleScroll);