antvis/G6

将画布导出为图片的时候遇到'cross-origin'相关错误 #1718

sircyh posted onGitHub

  • G6 Version:3.5.0
  • Platform:Vue
  • Mini Showcase(like screenshots):
  • CodePen Link:
graph.downloadFullImage('default_graph', {
            backgroundColor: '#fff',
            padding: [30, 15, 15, 15]
    }, 'image/png')

##在使用上述代码将画布导出为图片的时候遇到下述错误。请问怎么解决

Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help. 这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests