vue-lazyload
vue-lazyload copied to clipboard
lazyload component not working
im use nuxt my plugins
import Vue from 'vue'
import VueLazyload from 'vue-lazyload'
Vue.use({
install () {
Vue.prototype.destroy = Vue.prototype.$destroy
}
})
Vue.use(VueLazyload, {
lazyComponent: true
})
nuxt.config
plugins: [
{ src: '~/plugins/lazyload', mode: 'client' }
],
in pages
<div v-for="item in items" :key="item" class="run col-sm-3">
<lazy-component>
<Product
:item="item"
/>
</lazy-component>
</div>
it load all components not lazy , how can fix ?
nobody can help ?
@matamune94 I am having the same issue. Did you fix it or any solutions out there to achieve this? Thanks :)
Same issue. doesn't work. my config, loaded as a nuxt plugin:
/plugins/vue-lazyload.js
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,
observer: true,
});
nuxt config
plugins: [
{ src: '~/plugins/vue-lazyload.js', mode: 'client' },
],