diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue index f570c5442d..09e0ddf47a 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -153,7 +153,7 @@ const htmlToImage = () => { useEmitt().emitter.emit('l7-prepare-picture', config.value.id) downLoading.value = true setTimeout(() => { - const vueDom = componentWrapperInnerRef.value + const vueDom = document.getElementById(viewDemoInnerId.value) activeWatermarkCheckUser(viewDemoInnerId.value, 'canvas-main', scale.value / 100) downloadCanvas2('img', vueDom, '图表', () => { // do callback diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue index e4ac3f846a..c2feb1046a 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue @@ -695,7 +695,7 @@ const canvas2Picture = (pictureData, online) => { mapDom.appendChild(imgDom) } const preparePicture = id => { - if (id !== curView.id) { + if (id !== curView?.id) { return } const chartView = chartViewManager.getChartView(curView.render, curView.type) @@ -719,7 +719,7 @@ const preparePicture = id => { } } const unPreparePicture = id => { - if (id !== curView.id) { + if (id !== curView?.id) { return } const chartView = chartViewManager.getChartView(curView.render, curView.type)