-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
[Component] [image] Image 跨域问题 #15468
Comments
试试看, 移除crossorigin <el-image :crossorigin="null" /> |
@Cheerwhy 感谢你的回复,设置为 null 可以了。 |
可以将这个说明加到image文档的crossorigin属性上,欢迎 |
谢谢,我在 docs 上添加了 |
crossorigin 不要设置默认值,然后只保留 |
Fixed |
通过设置 el-image 的 crossorigin 为 null 解决跨域,但是会有TS类型错误,而且 el-image-viewer 仍然跨域 |
我也遇到了这个问题,el-image-viewer 仍然跨域 |
* fix(components): [image-viewer] Fix crossorigin closed #15468 * fix(components): update
之前 el-image 好好的,就是新版本加上 crossorigin 之后所有图片都产生了跨域问题,感觉以后官方维护者代码合并的审查需要更认真一点 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. 此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。 |
Bug Type:
Component
Environment
3.4.3
2.5.1
Chrome/120.0.6099.216
Nuxt
Reproduction
Related Component
el-image
Reproduction Link
Github Repo
Steps to reproduce
我把 element-plus 从 2.4.4 升级到 2.5.1 之后出现的问题,然后查看 releases 发现,新增了 crossorigin 属性。我单独对 crossorigin 和 referrerpolicy 属性,以及同时使用的各种值的排列组合进行了测试,依旧会出现跨域问题,所以来求助看看。项目中使用其他方式而非 el-image 的图片能够正常加载。
谢谢!
What is Expected?
图片正常加载
What is actually happening?
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Additional comments
(empty)
The text was updated successfully, but these errors were encountered: