-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ImageViewer 组件点击透传问题 #6357
Comments
ImageViewer在visible设为false的动画中,做了阻止冒泡的动作,如果你没使用它的visible,而是直接中断渲染,它就存在这个问题。 另外,还发现一个bug。 |
我用的就是 |
这个就奇怪了,我看到的现象和你不同。 |
+1 |
来个链接复现呢,没太明白具体的结构~ |
Hi, yuqi17. 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 创建一个实例。 |
https://codesandbox.io/s/elated-newton-lvwckn 由于没有后端服务,上传可以认为成功了. 然后点击上传成功后的图片的图标就可以调用ImageViwer组件预览它, 然后在上传按钮的上方点一下遮罩层, 就触发了再次的选择文件. 在沙盒里面我没有发现问题, 不知道是不是图片没有上传成功的原因. 实际上是有问题的, 我用的antd 和 antd mobile 的版本都在例子的package.json里面配置的跟我的情况一样. |
我也遇到了同样的问题,在使用ImageViewer.Multi,在点击Mask准备关闭图片预览,正好Mask点击处下层也有图片,就会一直闪动(关掉又立马开启预览) |
yuqi17 的复现好像没看到问题,我点击蒙层下的Upload 没重触发,你能来一个沙盒复现看看吗 |
弄个sandbox 把你的问题呈现出来 |
+1 最后解决没 |
我也遇到了,只能自己封装了一个 |
Version of antd-mobile
5.32.0
Operating system and its version
No response
Browser and its version
No response
Sandbox to reproduce
No response
What happened?
我写了一个上传图片的功能, 上传之后我点击上传的文件名,打开ImageViewer 组件传递图片路径进行预览. 此时这个组件的遮罩层在上传按钮和文件名的上方, 如果我点击这个位置去关闭遮罩层,会引起透传, 导致打开上传选择文件的功能,或者再次预览.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: