1.报错
2.解决方案
<div id='mychat' style={{ width: '100vw', height: '100vh' }}>
</div>
(1)使用ref
let mychart = this.$echarts.init(this.$refs.b)
(2)根据id获取
this.$echarts.init(document.getElementById("a"))
1.报错
2.解决方案
<div id='mychat' style={{ width: '100vw', height: '100vh' }}>
</div>
(1)使用ref
let mychart = this.$echarts.init(this.$refs.b)
(2)根据id获取
this.$echarts.init(document.getElementById("a"))