const res = graph.toDataURL(); //antv g6 API生成的图片URL
const binaryData = atob(res.split(',')[1]);
const uint8Array = new Uint8Array(binaryData.length);
for (let i = 0; i < binaryData.length; i++) {
uint8Array[i] = binaryData.charCodeAt(i);
}
const blob = new Blob([uint8Array], { type: 'image/png' });
// 将blob转file
const collect = new FormData();
collect.append('file', blob);
// 调接口
uploadImg(collect).then((res) => {})