We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
5.30.0
Android
所有安卓机型
No response
在处理这里兼容SSR模式下图片不展示的bug引入的,实测了几台安卓手机发现image的complete属性,即使在图片加载过程中也是返回true这样子,会直接展示出来,这样子懒加载的功能就失去意义了; 可以考虑把原来这段代码
useEffect(() => { if(imgRef.current.complete) { setLoaded(true); } }, []);
改成这样子的写法,兼容SSR模式
useEffect(() => { if (typeof process !== 'undefined' && process.release.name === 'node') { setLoaded(true); } }, []);
The text was updated successfully, but these errors were encountered:
来个重现看看哈~
Sorry, something went wrong.
Hi, 666hxw.
Please provide a online reproduction so that we can help you troubleshoot the problem. You can create a demo by codesandbox or stackblitz.
我们需要你提供一个在线的重现实例,以便于我们帮你排查问题。你可以通过 codesandbox 或 stackblitz 创建一个实例。
ssr 判断 window 不行吗
No branches or pull requests
Version of antd-mobile
5.30.0
Operating system and its version
Android
Browser and its version
所有安卓机型
Sandbox to reproduce
No response
What happened?
在处理这里兼容SSR模式下图片不展示的bug引入的,实测了几台安卓手机发现image的complete属性,即使在图片加载过程中也是返回true这样子,会直接展示出来,这样子懒加载的功能就失去意义了;
可以考虑把原来这段代码
改成这样子的写法,兼容SSR模式
Relevant log output
No response
The text was updated successfully, but these errors were encountered: