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

fix(image): fallback-src prop and lazy loading dosen't work #4485

Merged
merged 3 commits into from
May 11, 2023

Conversation

jizai1125
Copy link
Contributor

@jizai1125 jizai1125 commented Feb 15, 2023

close #4480, #4802

@vercel
Copy link

vercel bot commented Feb 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
naive-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2023 3:05pm

@jizai1125 jizai1125 force-pushed the fix/Image-fallback-src-not-work branch from 0461d05 to a502bc0 Compare February 16, 2023 07:01
@jizai1125 jizai1125 force-pushed the fix/Image-fallback-src-not-work branch from a502bc0 to ca22cf0 Compare March 12, 2023 04:13
@jizai1125 jizai1125 force-pushed the fix/Image-fallback-src-not-work branch from ca22cf0 to b83eefa Compare March 12, 2023 04:21
@jizai1125 jizai1125 changed the title fix(image): fallback-src prop dosen't work fix(image): fallback-src prop dosen't work lazy loading dosen't work Apr 11, 2023
@jizai1125 jizai1125 changed the title fix(image): fallback-src prop dosen't work lazy loading dosen't work fix(image): fallback-src prop dosen't work and lazy loading dosen't work Apr 11, 2023
@jizai1125 jizai1125 changed the title fix(image): fallback-src prop dosen't work and lazy loading dosen't work fix(image): fallback-src prop and lazy loading dosen't work Apr 11, 2023
@XieZongChen
Copy link
Collaborator

XieZongChen commented Apr 14, 2023

Need to consider: #4708#4267

@jizai1125
Copy link
Contributor Author

Need to consider: #4708#4267

#4708, It will always display the fallback-src image, even if the normal image can be loaded correctly.
#4267, It can fix the issue with fallback-src not working, but I found that Lazy load was not working.
I think that if the lazy prop is the only one set, use the browser's native loading attribute. However, if both lazy and intersection-observer-option are set, use IntersectionObserver API.

@07akioni 07akioni merged commit 31fb2f1 into tusen-ai:main May 11, 2023
1 of 3 checks passed
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

Successfully merging this pull request may close these issues.

Image组件fallback-src属性不可用
3 participants