请问在前端如何获得echarts图表的svg码?需要传到后台
document.querySelector('svg').outerHTML;//获取生成的svg代码
但是一般都不会传输这种长字符串,是需要转化为字节流传输的;例如:const blob= new Blob(["...获取到的svg编码..."], {type: 'xml/svg'})