diff --git a/src/components/scEcharts/index.vue b/src/components/scEcharts/index.vue index 30b5f400..b0458d6f 100644 --- a/src/components/scEcharts/index.vue +++ b/src/components/scEcharts/index.vue @@ -19,6 +19,7 @@ }, data() { return { + isActivat: false, myChart: null } }, @@ -36,11 +37,17 @@ } }, activated(){ - this.$nextTick(() => { - this.myChart.resize() - }) + if(!this.isActivat){ + this.$nextTick(() => { + this.myChart.resize() + }) + } + }, + deactivated(){ + this.isActivat = false; }, mounted(){ + this.isActivat = true; this.draw(); }, methods: {