vue-lazy-images

A plugin of lazy-load images for vue2.x
1,709
Install
npm install vue-lazy-images
Latest Version:1.4.6
Vue:2
License:MIT
Last Updated:Jan 13, 2018
Links: npm
Maintainer: lowesyang

vue-lazyload-images

npm Build Status Coverage Status npm

A plugin of lazy-load images for Vue2.x

Support images lazyload in window or build-in element.

Demo

Demo

Installation

npm

$ npm install vue-lazy-images

or

script

<script src="dist/VueLazyImages.js"></script>

Usage

Entry.js

import Vue from "vue"
import VueLazyImage from "vue-lazy-images";
Vue.use(VueLazyImage)

Template

<lazy-image 
    :src='url'
    :img-class='string'  //or :img-class="['classname1','classname2']"
    :placeholder='url of placeholder or loading image'  
/>

Options

Vue.use(VueLazyImage,options)

key description default type
offset offset distance for pre-loading 0 Number
events events that you want parentNode listen for ['scroll', 'wheel', 'mousewheel', 'resize', 'animationend', 'transitionend', 'touchmove'] Array
throttle spacing interval of continuous calling 0(ms) Number
debounce idle time between two actions 0(ms) Number

Related Packages

@unpic/vue

Vue component for responsive, high-performance images.

110,580 2,093
vue-visual

Vue 2 image and video loader supporting lazy loading, background videos, fixed a...

7,698 59
vue-images

A simple lightbox component for displaying an array of images

2,612 209
v-img

Vuejs plugin for image viewing

61,736 406
vue-responsive-image

A Vue component to manage responsive images

7,273 58

Version History

Version Released Vue License
1.4.6 ^2.2.6 MIT
1.4.5 ^2.2.6 MIT
1.4.4 ^2.2.6 MIT
1.4.3 ^2.2.6 MIT
1.4.2 ^2.2.6 MIT