From 39d91d2b2042e86a45c8b56b53f35d4a8b53b365 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 03 Dec 2024 13:09:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/main'
---
src/views/survey/components/box/dataContent.vue | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/views/survey/components/box/dataContent.vue b/src/views/survey/components/box/dataContent.vue
index ceac229..b92fe63 100644
--- a/src/views/survey/components/box/dataContent.vue
+++ b/src/views/survey/components/box/dataContent.vue
@@ -12,13 +12,13 @@
// import { ref, reactive, onMounted, nextTick, inject } from 'vue'
import { useEchartsResize } from "hooks/useEchartsResize"
import { getRescueTeamStatistic } from "@/api/indParkInfo"
-import { nextTick } from "vue"
+import { nextTick, onUnmounted } from "vue"
let $echarts = inject("echarts")
const curEcharts = ref(null)
let myEcharts = reactive({
- chart: ''
+ chart: null
})
const echartsColors = ['#1E90FF', '#36A2EB', '#FFD700', '#FFA500', '#228B22', '#8FBC8F']
@@ -129,6 +129,15 @@
}
useEchartsResize(echartsResize)
+
+onUnmounted(() => {
+ if (myEcharts.chart) {
+ myEcharts.chart.clear()
+ myEcharts.chart.dispose()
+
+ myEcharts.chart = null
+ }
+})
</script>
<template>
--
Gitblit v1.9.3