1.0.3 • Published 4 years ago
vue-simple-lazyimg v1.0.3
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!