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

vue3使用阿里云oss存储的外链图片,在裁剪框内不显示,但是百度上的外链图片可以显示,请问大佬这是什么原因 #856

Open
lmt19920506 opened this issue Oct 31, 2024 · 6 comments

Comments

@lmt19920506
Copy link

<VueCropper ref="cropperRef" :img="showUrl" canScale :outputSize="option.size" :outputType="option.outputType" :autoCrop="option.autoCrop" :fixedBox="true" :autoCropWidth="currentImageObj.width" :autoCropHeight="currentImageObj.height" :full="option.full" @realTime="realTime" @imgMoving="imgMoving" @cropMoving="cropMoving" > </VueCropper>

showUrl数据为阿里云oss存储的外链图片地址:
const showUrl = ref('https://likein-test.oss-cn-beijing.aliyuncs.com/e73cdb560467435589eae9a154c5827e.png')

求大佬指导。

@lmt19920506
Copy link
Author

image

源码截屏在这里:
image
image
showUrl为阿里云图片外链地址,如果换成百度的图片地址,就可以显示

@xyxiao001
Copy link
Owner

可能是跨域了,需要在阿里云能配置下

@lmt19920506
Copy link
Author

如果用img标签src引入图片,是可以显示图片的。后面考虑到跨域这个问题,让后端放开了跨域,但是还是不显示

@lmt19920506
Copy link
Author

我把阿里云的图片外链放到您的demo的案例里面,是可以正常显示的

@xyxiao001
Copy link
Owner

img标签和canvas截图是不一样的,要看看具体报错

@lmt19920506
Copy link
Author

没有报错,然后我再交流群里说明了问题,期待您的回复,谢谢

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

No branches or pull requests

2 participants