vue-lazy-image

1.2.0 • Public • Published

NPM version

lazy-image for Vue

a lazy-image module for Vue 1.0+ & 2.0+

npm package

vue-lazy-image

demo

vue-lazy-image-demo

usage

const lazy = require('vue-lazy-image')
// or use ES2015
//import lazy from 'vue-lazy-image'
 
Vue.use(lazy);
 
// or with options
Vue.use(lazy, {
    error: 'http://xxx.com/error.png', //error image
    loading: 'http://xxx.com/loading.png', //loading image
    try: 2, // the count of try to load one image
});
 
<img v-lazy="item.image">
<div class="img" v-lazy:background-image="item.image"></div>

build

 
npm run build
 

Package Sidebar

Install

npm i vue-lazy-image

Weekly Downloads

4

Version

1.2.0

License

MIT

Last publish

Collaborators

  • ccforward