vue-lazyload
vue-lazyload copied to clipboard
Lazy component?
How can i implement Lazy Component? i've spent some time trying to make it work but it's not happening.
same question...
@hilongjw Seems like the Lazy component
dosen't work at all
hi guys, for me it works without any magic just turn it on in component options:
Vue.use(VueLazyload, {
lazyComponent: true,
});
and use just as a wrapper
<lazy-component>
ANYTHING
</lazy-component>
@dmydry Thanks, works flawlessly. Can't that example go to the docs?
https://github.com/hilongjw/vue-lazyload#lazy-component
Doesn't work for me following the docs.
import Vue from 'vue';
import VueLazyload from 'vue-lazyload';
Vue.use(VueLazyload, {
preLoad: 1.3,
error: '/img/loading-grey.gif',
loading: '/img/loading-grey.gif',
attempt: 1,
lazyComponent: true,
});
<lazy-component>
CONTENT
</lazy-component>