vue-dom-lazy-load

Vue plug-in for dom node lazy loading such as image Lazy Loading

Usage no npm install needed!

<script type="module">
  import vueDomLazyLoad from 'https://cdn.skypack.dev/vue-dom-lazy-load';
</script>

README

为了提升页面响应速度,优化用户体验,可以适当的减轻页面首次加载的压力,把不在可视区的部分,进行懒加载。
In order to improve the page response speed and optimize the user experience, it can properly reduce the pressure of the first loading of the page, and lazily load the part not in the visual area.

https://img.shields.io/npm/v/vue-dom-lazy-load.svg?label=vue-rescroll 总下载量

安装/Install

npm install vue-dom-lazy-load --save

使用/Use

main.js

import VueDomLazyLoad from 'vue-dom-lazy-load';
Vue.use(VueDomLazyLoader);

*.vue

使用默认配置/use default config
<img :src="baseUrl" v-dom-lazy-load />