Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading image not showing #477

Open
BASSAMBOFS opened this issue Oct 25, 2021 · 1 comment
Open

Loading image not showing #477

BASSAMBOFS opened this issue Oct 25, 2021 · 1 comment

Comments

@BASSAMBOFS
Copy link

BASSAMBOFS commented Oct 25, 2021

### Hello World! ###

The Loading image is not showing, any suggestions please ??

#vue-lazyload.js

 import Vue from 'vue';
 import VueLazyload from 'vue-lazyload';

 import loadingImg from '../assets/img/loading/loading.png';

 Vue.use(VueLazyload, {
 preLoad: 1.3,
 loading: loadingImg,
 attempt: 1,
 });

#nuxt.config.js

plugins: [
    ...
    { src: '~/plugins/vue-lazyload', ssr: false },
 ]

#template:

<template>
    <a :href="image.url" class="fx fx-center-center">
      <img
        v-show="showImg"
        v-lazy="imgSrc"
        :src="imgSrc"
        :alt="image.name"
        :title="image.name"
      />
    </a>
</template>
@akylc
Copy link

akylc commented Dec 29, 2021

同样遇到这个问题, 但是经过排查发现是因为v-lazy指令被覆盖导致, 我的项目中引用了vant-lazyload 与 vue-lazyload配置冲突了, 导致vant-lazyload 配置覆盖了vue-lazyload, 希望这个对你有帮助.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants