mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-08 07:31:09 +08:00
fix: chart instance disposal condition
dom has been disposed in vue3 v-if,but chartInstance exist
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user