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

懒加载部分失败 #1

Open
supernewtom opened this issue Nov 22, 2017 · 3 comments
Open

懒加载部分失败 #1

supernewtom opened this issue Nov 22, 2017 · 3 comments

Comments

@supernewtom
Copy link

只有暴露在可见区的图片才会懒加载成功,往下拉,下面的图片没有懒加载成功,这是怎么回事呢?

@yodfz
Copy link
Owner

yodfz commented Mar 14, 2018

你可以为图片设置了一些高度,懒加载使用的是计算相对位置高度的方法并且进行缓存了高度。所以可能在页面完成之后你改动了页面高度,造成图片缓存高度与实际高度不一致。

@somnusnrlq
Copy link

如果加载的图片404了 如何进行onerror处理

这么写没反应

@somnusnrlq
Copy link

<img :data-src="'../../assets/images/1x1.png'" :src="item.ThumbnailRelativePath" onerror="this.onerror='';this.src='../../assets/images/404.png'" class="lazyimg" alt="" />

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

3 participants