From 9a37c5e1b2190c3f6ec71483923922189091dd52 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 18 Dec 2024 09:42:01 +0800
Subject: [PATCH] 事件模拟更新
---
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