// 获取元素
let dom = document.getElementById("container");
// 初始化echarts
let myChart = echarts.init(dom);
修改为
// 获取元素
let dom = document.getElementById("container") as HTMLElement;
// 初始化echarts
let myChart = echarts.init(dom);
网友评论