Sign inSign up

Pull-to-load functionality implemented with iScroll.js and Vue.js

Add-ons
2026-07-26 00:38 3 views • 0 downloads 40.1KB
Pull-to-load functionality implemented with iScroll.js and Vue.js

Written based on the official iScroll documentation:

First, initialize a new iScroll instance in window.onload.

Second, configure the iScroll parameters (all written together here, but you can also use the following section to configure them). myscroll.onScrollMove = function To configure them.

Third, use is_r to control whether requests are sent.

Vue section

static controls the display of the status indicator: 0 means pull up, 1 means loading, and 2 means loading completed.

If no special requirements exist, simply wrap the for loop in the onScrollMove method and the section below it inside the success callback of the AJAX request.

The implementation is a bit rough, but I hope it helps fellow developers who encounter the same problem!