echarts中option的data传数组,千万不要对数组进行操作,否则会出bug
you may have an infinite update loop in watcher with expression

错误分析:
首先chartSource在created生命周期中获取数据时也发生了变化,watch监听到后,重新渲染图标执行option操作,结果option中的data中的数组进行倒置了,

 data: data.xAxis.reverse()

那么watch监听的chartSource又发生变化,陷入了无限死循环中。

父组件中的传参:

子组件:

Logo

前往低代码交流专区

更多推荐