Commit ccd59f743579f47222a217bc7a570ab1fc9c7cd7

Authored by fengtao
1 parent cf2c7831

perf(src/packages/components): 优化图表动画,为开启时才执行动画效果

... ... @@ -245,8 +245,10 @@ const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, ne
245 245 }
246 246 }
247 247 })
248   - //
249   - addPieInterval(newData)
  248 + //动画为开启才执行动画
  249 + if (props.chartConfig.option.isCarousel) {
  250 + addPieInterval(newData)
  251 + }
250 252 updateVChart(newData)
251 253 })
252 254
... ...
... ... @@ -244,8 +244,10 @@ const {vChartRef} = useChartDataFetch(props.chartConfig, useChartEditStore, (new
244 244 }
245 245 }
246 246 })
247   - //
248   - addPieInterval(newData)
  247 + //动画为开启才执行动画
  248 + if (props.chartConfig.option.isCarousel) {
  249 + addPieInterval(newData)
  250 + }
249 251 updateVChart(newData)
250 252 })
251 253
... ...
... ... @@ -274,8 +274,10 @@ const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, ne
274 274 }
275 275 }
276 276 })
277   - //
278   - addPieInterval(newData)
  277 + //动画为开启才执行动画
  278 + if (props.chartConfig.option.isCarousel) {
  279 + addPieInterval(newData)
  280 + }
279 281 updateVChart(newData)
280 282 })
281 283
... ...