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))