1. 首先我们先生成我们的图表 具体配置不详细写了
2.我们在点击的时候去获取我们的图表并转成base64格式
itemClick(){
console.log(document.getElementById('mydome').getElementsByTagName('canvas')[0])
let baseCanvas = document.getElementById('mydome').getElementsByTagName('canvas')[0]
let width = baseCanvas.width;
let height = baseCanvas.height;
let ctx = baseCanvas.getContext("2d");
ctx.drawImage(baseCanvas,width,height);
console.log(baseCanvas.toDataURL())
this.url = baseCanvas.toDataURL()
},