Binaryify / vue-qr

The Vue Component for Awesome-qr.js
MIT License
849 stars 123 forks source link

当二维码设置logo时, 由于跨域问题浏览器报错无法加载 #87

Open aboutZZ opened 3 years ago

aboutZZ commented 3 years ago

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.

建议

请将imgcrossOrigin属性设置为Anonymous

Binaryify commented 3 years ago

晚上回去我改下吧, Awesome-qr.js 有点坑

Binaryify commented 3 years ago

重新装下看看

uchihayu commented 3 years ago

还是会出现上面的报错。vue-qr: 2.4.0, binaryify-awesome-qr: 2.1.10;chrome86

Binaryify commented 3 years ago

@uchihayu crossOrigin 我已经设了Anonymous,还报错的话应该是服务器的设置问题