From 1a76a98995e6c2d37b700ad6f2bfe44aa5aecbff Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 26 Jan 2026 09:29:05 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E5=9B=BE=E8=A1=A8=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E6=B5=8F=E8=A7=88=E5=99=A8=E7=AA=97=E5=8F=A3=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E9=87=8D=E7=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/dashboardPage/dashboard8/utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/report/dashboardPage/dashboard8/utils.ts b/src/views/report/dashboardPage/dashboard8/utils.ts index 2ba468b1..fe6c7c70 100644 --- a/src/views/report/dashboardPage/dashboard8/utils.ts +++ b/src/views/report/dashboardPage/dashboard8/utils.ts @@ -1,4 +1,4 @@ -import { onUnmounted } from 'vue' +import { onMounted, onUnmounted } from 'vue' import * as echarts from 'echarts' export const colors = { @@ -45,7 +45,12 @@ export function useChart(domId: string) { chart?.resize() } + onMounted(() => { + window.addEventListener('resize', resize) + }) + onUnmounted(() => { + window.removeEventListener('resize', resize) chart?.dispose() })