fix: 补充修复panel的echart类型内存溢出问题
This commit is contained in:
@@ -1396,7 +1396,8 @@
|
|||||||
this.clearChart();
|
this.clearChart();
|
||||||
//const addChartBox = document.querySelector('.right-box-add-chart');
|
//const addChartBox = document.querySelector('.right-box-add-chart');
|
||||||
//addChartBox.style.cssText = this.oldChartBoxCss;
|
//addChartBox.style.cssText = this.oldChartBoxCss;
|
||||||
this.echartModalStore.off('magictypechanged')
|
this.echartModalStore.off('magictypechanged');
|
||||||
|
this.$refs.screenLegendArea._ps_.destroy();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<div class="line-area" ref="lineChartArea" :id="'lineChartArea'+chartIndex" v-show="firstShow" style="width:100%;"></div>
|
<div class="line-area" ref="lineChartArea" :id="'lineChartArea'+chartIndex" v-show="firstShow" style="width:100%;"></div>
|
||||||
<div class="chart-no-data" v-show="noData">No Data</div>
|
<div class="chart-no-data" v-show="noData">No Data</div>
|
||||||
<template v-if="!hasLegendOptions">
|
<template v-if="!hasLegendOptions">
|
||||||
<div class='legend-container' ref="legendArea" v-show="firstShow">
|
<div class='legend-container' ref="legendArea" v-show="firstShow" v-scrollBar:legend>
|
||||||
<div v-for="(item, index) in legendListMore" :title="item.alias?item.alias:item.name" @click="clickLegend(item.name,index)" class="legend-item" :class="{'ft-gr':isGrey[index]}" :key="'legend_' + item.name+'_'+index">
|
<div v-for="(item, index) in legendListMore" :title="item.alias?item.alias:item.name" @click="clickLegend(item.name,index)" class="legend-item" :class="{'ft-gr':isGrey[index]}" :key="'legend_' + item.name+'_'+index">
|
||||||
<span class="legend-shape" :style="{background:(isGrey[index]?'#D3D3D3':item.color)}"></span>{{item.alias?item.alias:item.name}}
|
<span class="legend-shape" :style="{background:(isGrey[index]?'#D3D3D3':item.color)}"></span>{{item.alias?item.alias:item.name}}
|
||||||
</div>
|
</div>
|
||||||
@@ -1730,6 +1730,7 @@
|
|||||||
}
|
}
|
||||||
setChart(this.chartIndex, null);
|
setChart(this.chartIndex, null);
|
||||||
window.removeEventListener('resize', this.chartResize);
|
window.removeEventListener('resize', this.chartResize);
|
||||||
|
this.$refs.legendArea._ps_.destroy();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1377,7 +1377,7 @@
|
|||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(n) {
|
handler(n) {
|
||||||
console.log(n);
|
//console.log(n);
|
||||||
if(n.title){
|
if(n.title){
|
||||||
this.isEdit=true;
|
this.isEdit=true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -477,12 +477,12 @@
|
|||||||
watch:{
|
watch:{
|
||||||
|
|
||||||
},
|
},
|
||||||
destroyed() {
|
beforeDestroy() {
|
||||||
if(this.chart){
|
if(this.chart){
|
||||||
this.chart.clear();
|
this.chart.clear();
|
||||||
this.chart.off('mouseover');
|
/*this.chart.off('mouseover');
|
||||||
this.chart.off('mouseout');
|
this.chart.off('mouseout');
|
||||||
EleResize.off(this.$el, this.resize, this.chartType);
|
EleResize.off(this.$el, this.resize, this.chartType);*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user