点击按钮自动刷新echarts的宽度问题,可以采用setTimeout异步执行欧
setTimeout(() => { echarts.init(document.getElementById('main')).resize(); }, 0);