vue-simple-lazyimg
v1.0.3
Published
A simple image lazy loading
Downloads
8
Maintainers
Readme
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 [email protected], thank you so much!