/vue-lazyloadImg

vue插件,延迟载入图片.

Primary LanguageJavaScript

npm version NPM Downloads

NPM

NPM

How do use?

效果展示

step 1 install

npm install --save vue-lazyloadimg

step 2 use vue

import vue-lazyloadimg

import vueLazyImg from 'vue-lazyloadimg';
import vue from 'vue';
vue.use(vueLazyImg);

step 3 .vue setting image

module read class lazyimg and cache to onscroll event.

<img src="{{'1x1 transform png'}}" :data-src="{{need load img url}}" class="lazyimg" alt="">

build script

use babel.