工作台:echarts修复

This commit is contained in:
guoyue 2022-07-18 14:17:45 +08:00
parent d2460b321c
commit 9d0e7bb4aa
1 changed files with 1 additions and 10 deletions

View File

@ -42,12 +42,7 @@ export default {
handler(newVal, oldVal) { handler(newVal, oldVal) {
if (newVal) { if (newVal) {
this.dataListCopy = newVal; this.dataListCopy = newVal;
if (document.getElementById(this.id)) { this.initChart()
//
setTimeout(() => {
this.initChart()
}, 2000)
}
} }
}, },
deep: true, deep: true,
@ -55,9 +50,6 @@ export default {
}, },
}, },
mounted() { mounted() {
setTimeout(() => {
this.initChart()
}, 2000)
}, },
methods: { methods: {
initChart() { initChart() {
@ -68,7 +60,6 @@ export default {
this.myChart = chartDom && echarts.init(chartDom); this.myChart = chartDom && echarts.init(chartDom);
let lengendArr = this.dataListCopy.filter(v => v.name); let lengendArr = this.dataListCopy.filter(v => v.name);
let total = 0; let total = 0;
this.dataListCopy.map(v => { this.dataListCopy.map(v => {
if (v.value || v.value === 0) { if (v.value || v.value === 0) {