VTable icon indicating copy to clipboard operation
VTable copied to clipboard

[Bug] 图片跨域

Open TryChai opened this issue 1 year ago • 2 comments

Version

1.7.7

Link to Minimal Reproduction

no link

Steps to Reproduce

image

Current Behavior

图片跨域了 无法正确的加载出来

Expected Behavior

我尝试找源码修复 但是没有找到 好像在其他的包 node_modules里面

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

TryChai avatar Sep 27 '24 07:09 TryChai

确保你们的服务器设置了正确的 Access-Control-Allow-Origin 头。 @TryChai

fangsmile avatar Sep 29 '24 11:09 fangsmile

设置了,我们用了微前端,接口啥的都是允许的,我们微前端 用了另一个域名的

TryChai avatar Sep 30 '24 07:09 TryChai

image 先确认一下相响应头的access-control-allow-origin是否配置正确吧;我们在创建图片的时候加入了配置img.crossOrigin = 'anonymous';如果不加的话,Canvas可能会无法正常渲染图片

Rui-Sun avatar Oct 08 '24 11:10 Rui-Sun

image

TryChai avatar Oct 21 '24 10:10 TryChai