vue-lazyload icon indicating copy to clipboard operation
vue-lazyload copied to clipboard

lazyload component not working

Open matamune94 opened this issue 5 years ago • 3 comments

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 ?

matamune94 avatar Aug 11 '19 07:08 matamune94

nobody can help ?

matamune94 avatar Aug 13 '19 04:08 matamune94

@matamune94 I am having the same issue. Did you fix it or any solutions out there to achieve this? Thanks :)

aakashthapa001 avatar Sep 09 '20 11:09 aakashthapa001

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' },
  ],

tbredin avatar Oct 12 '20 05:10 tbredin