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!