Open aboutZZ opened 3 years ago
canvas 将图片转为base64报错: DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported
DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported
Uncaught (in promise) DOMException: The operation is insecure.
请将img的crossOrigin属性设置为Anonymous
img
crossOrigin
Anonymous
晚上回去我改下吧, Awesome-qr.js 有点坑
重新装下看看
还是会出现上面的报错。vue-qr: 2.4.0, binaryify-awesome-qr: 2.1.10;chrome86
@uchihayu crossOrigin 我已经设了Anonymous,还报错的话应该是服务器的设置问题
Chrome 浏览器 90.0.4430.93
canvas 将图片转为base64报错:
DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported
火狐浏览器 88.0
Uncaught (in promise) DOMException: The operation is insecure.
建议
请将
img
的crossOrigin
属性设置为Anonymous