diff --git a/src/components/chart/EffectScatter.vue b/src/components/chart/EffectScatter.vue index 3ff8e1c..3893e4e 100644 --- a/src/components/chart/EffectScatter.vue +++ b/src/components/chart/EffectScatter.vue @@ -21,6 +21,8 @@ let currentClickPosition = ref([]); async function updateSvg(svg, option) { if (!chart.value && dom.value && svg) { init(); + } else { + clear() } axios.get(svg.path).then(({ data }) => { echarts.registerMap(svg.full_name, { svg: data }); @@ -44,6 +46,10 @@ async function updateSvg(svg, option) { console.log("updateSvg", svg.path); } +function clear() { + chart.value.clear() +} + function init() { const curChart = echarts.init(dom.value); chart.value = markRaw(curChart); @@ -62,7 +68,7 @@ defineExpose({ }); diff --git a/src/components/customUI/Modal.vue b/src/components/customUI/Modal.vue index f4c785a..7fffccf 100644 --- a/src/components/customUI/Modal.vue +++ b/src/components/customUI/Modal.vue @@ -1,6 +1,6 @@