Skip to content

Commit 1e1cd6c

Browse files
committed
fix: 新增图表解绑,解决内存泄漏问题
1 parent 9c2424d commit 1e1cd6c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/vue/src/chart/chart-core/src/chart-core.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,8 @@ export default {
540540
this.afterSetOptionOnce && this.afterSetOptionOnce(this.integrateChart.echartsIns)
541541
},
542542
beforeUnmount() {
543+
this.integrateChart = null
544+
if (this.integrateChart.uninstall) this.integrateChart.uninstall()
543545
this.watchToPropsEchartOptions.forEach((unwatch) => {
544546
unwatch && unwatch()
545547
})

0 commit comments

Comments
 (0)