Comments (13)
至今仍存在,滑动停止后,还需要在上下滑一下才显示。。
from vue-lazyload.
@zhaozhaobaiping 可以提供一下 移动端的系统和浏览器信息
from vue-lazyload.
Android和iOS都是,运行在微信浏览器里面
from vue-lazyload.
@zhaozhaobaiping 在线demo 是没有问题的,http://hilongjw.github.io/vue-lazyload/ ,可否看一下有没有相关报错 logs
from vue-lazyload.
如果报错还好,还能找到问题在呢。关键就是没有报错。主要是鼠标滚轮滚动的话没问题,滚到的地方就加载,关键是在手机上滑动到的地方不能加载,需要额外一个事件来触发,比如我给这个图加一个单击事件,那么附近的三张图片就会加载,不加事件就不加载,会不会是布局有局限呢
from vue-lazyload.
@zhaozhaobaiping 是元素内滚动的吗?
from vue-lazyload.
是的,项目是做点餐的。我在页面有一个一个tab页,其中有一个是菜品列表,列表里面有多个关于菜品的图片、价格、名字。
我这边上github比较慢,有没有邮箱之类的,我可以发一些截图之类的
from vue-lazyload.
@zhaozhaobaiping 尝试设置一下父元素
<ul id="container">
<li v-for="img in list">
<img v-lazy.container="img">
</li>
</ul>
<ul id="container">
<li v-for="img in list">
<div v-lazy:background-image.container="img"></div>
</li>
</ul>
from vue-lazyload.
<div id="dish_wrapper">
<ul id="container" @touchmove='computHeight($event)'>
<li v-for="category in categories" class="js-dish">
<div class="dish" v-for="dish in category.dishes">
<div class="dish-picture" v-lazy:background-image.container="dish.thumb">
</div>
<div class="dish-detail">
<div class="flag">
<div class="flag-item">
¥{{dish.price}}/份
</div>
<div class="flag-item">
<i class="sub" @click='subDish(dish)' v-if='dish.quantity'></i>
<span v-if='dish.quantity'>{{dish.quantity}}</span>
<i class="plus" @click='plusDish(dish)'></i>
</div>
</div>
<p>{{dish.title}}</p>
</div>
</div>
</li>
</ul>
</div>
还是不行
from vue-lazyload.
<div id="dish_wrapper"> <ul id="container" @touchmove='computHeight($event)'> <li v-for="category in categories" class="js-dish" @click.stop='helpme'> <div class="dish" v-for="dish in category.dishes"> <div class="dish-picture" v-lazy:background-image.container="dish.thumb"> </div> </div> </li> </ul> </div>
我按照您说的在父元素上设置了 还是不行 麻烦您再看一下
from vue-lazyload.
@zhaozhaobaiping 你的id=container的元素是页面加载时立即绘制到body中的么?我看了vue-lazyload的源码,如果你的父元素延迟出现在页面中,是不会给它绑定scroll事件的,这样会导致滚动时不继续加载图片。
from vue-lazyload.
@mengchen129 之前没考虑到你说的这个场景,我会增加实例方法来主动添加对scroll el 的监听
from vue-lazyload.
至今仍存在,滑动停止后,还需要在上下滑一下才显示。。
确实在手机端滑动时候不显示图片,需要再次滑动才显示。在浏览器中用鼠标滚轮滑动无此问题
from vue-lazyload.
Related Issues (20)
- 最新版本`1.3.4`的产物中将const 编译了进去,会导致在ios9中执行报错 HOT 4
- bug: lazy-compoent slots will lost its data binding, unless use ':key' to replace self.
- 只有界面滚动才会触发 HOT 2
- vue2和vue3版本安装方式都一样的,怎么去区分呢 HOT 1
- Warnings in Vue 2.6.12 HOT 5
- Is there a way to prevent console logging 404 error?
- My image called two times
- 图片非常多,内存没被释放,页面卡死崩溃 HOT 1
- 图片缓存后再次获取naturalWidth/Height大小为0 HOT 1
- not working with vue slick
- Can't resolve lazy directive in SSR
- How to use in Nuxt.js 3? HOT 1
- nuxt3下将v-lazy认为是vue指令,导致服务端SSR启用。 HOT 2
- img.crossorigin = 'anonymous' HOT 1
- 这个触发是按照屏幕上看到的图片来吗
- [email protected] tag HOT 1
- Solution to error reporting in nuxt3 getSSRProps HOT 1
- Solution to Nuxt3 getSSRProps Error HOT 5
- v-lazy-container Nuxt3 in repeated loading HOT 1
- v-lazy元素被复用。导致图片出现在错误的元素上。 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-lazyload.