vite vue3使用echart

Vue 3 中,响应式状态都被封装为一个 Proxy 实例。如果状态本身也是一个对象,Vue 会默认同时代理其属性(利用 Proxy 特性)。你的代码 this.chart.setOption、this.chart.resize 访问的实际上是被 Vue proxy 代理出来的属性。这里应该出现了引用问题,导致 ECharts 实例的某个方法调用失败。

解决办法






你可能感兴趣的:(vite vue3使用echart)