From 87bc0602bfc2c31c4a915c33f37fe4d8f83444b0 Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Mon, 8 Nov 2021 13:02:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E9=94=80=E6=AF=81?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/echart/index.vue | 4 ++++ src/utils/drawMixin.js | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/echart/index.vue b/src/common/echart/index.vue index 7db3a64..6473245 100644 --- a/src/common/echart/index.vue +++ b/src/common/echart/index.vue @@ -48,6 +48,10 @@ export default { this.$echarts.registerTheme('tdTheme', tdTheme); // 覆盖默认主题 this.initChart(); }, + beforeDestroy () { + this.chart.dispose() + this.chart = null + }, methods: { initChart () { // 初始化echart diff --git a/src/utils/drawMixin.js b/src/utils/drawMixin.js index f928d87..93e1236 100644 --- a/src/utils/drawMixin.js +++ b/src/utils/drawMixin.js @@ -30,7 +30,6 @@ export default { methods: { calcRate () { const appRef = this.$refs["appRef"] - console.log(appRef) if (!appRef) return // 当前宽高比 const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5))