diff --git a/packages/lb-annotation/src/utils/ImgUtils.ts b/packages/lb-annotation/src/utils/ImgUtils.ts index 3fb08bda4..60f811a36 100644 --- a/packages/lb-annotation/src/utils/ImgUtils.ts +++ b/packages/lb-annotation/src/utils/ImgUtils.ts @@ -3,6 +3,8 @@ export default class ImgUtils { return new Promise((resolve, reject) => { const imgNode = new Image(); + imgNode.crossOrigin = 'anonymous'; + // 暂时判断 file 协议的路径进行 encode 操作 if (src.startsWith('file')) { imgNode.src = encodeURI(src);