From d61df4674a9e5ecfefb2122802166d5b4923e5a7 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期二, 31 十二月 2024 14:52:03 +0800 Subject: [PATCH] itemchart clear --- src/views/model/pre/item/MmPredictItemChart.vue | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/model/pre/item/MmPredictItemChart.vue b/src/views/model/pre/item/MmPredictItemChart.vue index 2670907..14afaed 100644 --- a/src/views/model/pre/item/MmPredictItemChart.vue +++ b/src/views/model/pre/item/MmPredictItemChart.vue @@ -79,6 +79,8 @@ dataForm.value.id = row.id; dataForm.value.itemName = row.itemname; if (row.id) { + myChart = echarts.init(chartDomPre.value); + myChart.clear() getDataList(); } } @@ -160,7 +162,6 @@ }) } - myChart = echarts.init(chartDomPre.value); const option = { title: { text: dataForm.value.itemName, @@ -208,7 +209,6 @@ ], series: seriesData, }; - myChart.clear() myChart.setOption(option); } catch (error) { console.error(error) -- Gitblit v1.9.3