vue-simple-lazyimg

1.0.3 • Public • Published

vue-simple-lazyimg

Intro


This is a simple image lazy loading plugin for Vue,it’s very easy to use.

Installation


npm install vue-simple-lazyimg --save

Usage


 
import lazyimg from 'vue-simple-lazyimg'
 
const options = {  
 loading: '', // image loading url  
 error: '' // image onerror url
}
 
// Optional, we provide default image for error and loading.  
Vue.use(lazyimg, options)
 
// components  
<img v-lazyimg="imgUrl" />
 
<script>
  export default {
    data () {
      return {
        imgUrl: '',
      }
    }
  }
</script>

At last,If there is any problems in using, please send E-mail to 1428925451@qq.com, thank you so much!

Package Sidebar

Install

npm i vue-simple-lazyimg

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

145 kB

Total Files

3

Last publish

Collaborators

  • iris_mei