This time I will show you how to use the Vue-based delayed loading plug-in vue-view-lazy, and what are theprecautions for using the Vue-based delayed loading plug-in vue-view-lazy. Here is the actual combat Let’s take a look at the case.
Purpose:Load pictures or other resources after entering thevisible area
Install and use
Use directly
$ npm install --save-dev vue-view-lazy
Introduce vue-view-lazy
.main fileimport vView from 'vue-view-lazy' Vue.use(vView,{ error:'../../static/images/loading.png', loading:'../../static/images/loading.gif', });
Lazy loading of images
.vue fileLazy loading of data
.vue file
getAjaxContent(e,v.msg)"> loading...
loading...
The above is the detailed content of How to use the Vue-based lazy loading plug-in vue-view-lazy. For more information, please follow other related articles on the PHP Chinese website!
How to solve the problem that css cannot be loaded
What to do if css cannot be loaded
What to do if loading dll fails
ie shortcut cannot be deleted
How to solve the problem that IE shortcut cannot be deleted
What should I do if the docker container cannot access the external network?
What are the gsm encryption algorithms?
Top ten digital currency exchanges