A component for image lazy loading implement by vuejs
npm install vue-lazy-img --save
And, if you are using vue 2.0
npm install vue-lazy-img@next --save
var VueLazyImg = require('vue-ip-input');
new Vue({
components: {
'vue-lazy-img': VueLazyImg
},
template: '<vue-lazy-img source="..." placeholder="..."></vue-lazy-img>'
});
import VueLazyImg from 'vue-lazy-img';
new Vue({
components: {
'vue-lazy-img': VueLazyImg
},
template: '<vue-lazy-img source="..." placeholder="..."></vue-lazy-img>'
});
Property | Description |
---|---|
source | the source of the image |
placeholder | the placeholder of the image which will be loaded before the source |