How to make the loading of data while scrolling VueJS?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
15 views
Interested in is a method call, when the content comes to an end, how to implement it?
by | 15 views

1 Answer

0 like 0 dislike
\rexport default {\rmethods: {\rdoAlert () {\ralert('Hi!')\r}\r},\rcreated () {\rwindow.addEventListener('scroll', () => {\rlet body = document.getElementsByTagName('body')[0]\rif (window.scrollY > body.clientHeight) {\rthis.doAlert()\r}\r})\r}\r}\r
by
110,608 questions
257,187 answers
0 comments
40,796 users