Browse Source
fix: chart instance disposal condition
dom has been disposed in vue3 v-if,but chartInstance exist
pull/7119/head
Qiu
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
packages/effects/plugins/src/echarts/use-echarts.ts
|
|
|
@ -92,7 +92,8 @@ function useEcharts(chartRef: Ref<EchartsUIType>) { |
|
|
|
return; |
|
|
|
} |
|
|
|
useTimeoutFn(() => { |
|
|
|
if (!chartInstance) { |
|
|
|
if (!chartInstance || chartInstance?.getDom() !== el) { |
|
|
|
chartInstance?.dispose(); |
|
|
|
const instance = initCharts(); |
|
|
|
if (!instance) return; |
|
|
|
} |
|
|
|
|