GithubHelp home page GithubHelp logo

Comments (4)

oddonet avatar oddonet commented on May 1, 2024

The issue, apparently, is related to lazyLoad. If change the image src attribute to 'src' instead of 'v-lazy' then it works fine.

from vant.

pangxie1991 avatar pangxie1991 commented on May 1, 2024

sometime swipe image will change to drag image, this bug is fixed in #81
v-lazy seems to work correctly, you can try the second demo in this page -> demo page

from vant.

oddonet avatar oddonet commented on May 1, 2024

Thanks for the quick turn around. However, the issue has not yet been resolved.

I was using 'autoPlay' and it is still not working after I implemented your fix. Please see the the html in chrome dev-tool as below:

<div id="slider">
    <div class="van-swipe">
        <div class="van-swipe__items">
            <div class="van-swipe-item"
                 style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; transform: translate3d(398px, 0px, 0px); display: block;">
                <img alt="" src="https://img.yzcdn.cn/upload_files/2017/03/09/FvkZahKoq1vkxLQFdVWeLf2UCqDz.png"
                     lazy="loaded"></div>
            <div class="van-swipe-item"
                 style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; transform: translate3d(0px, 0px, 0px); display: block;">
                <img alt="" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
                     lazy="loading">
        </div>
        </div><!----></div>
</div>

Notice the image source for the second image is not what is intended. And also the lazy loading is stuck in the loading process.

from vant.

pangxie1991 avatar pangxie1991 commented on May 1, 2024

actually the v-lazy directly use the vue-lazyload.
i tried this in my chrome and it work correctly.

maybe you can change the img src to another url. img.yzcdn.cn <- this cdn is mainly focused on china mainland, sometimes not available abroad.

from vant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.