diff --git a/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue b/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue index a1c9e0c776..c5d2c42bcd 100644 --- a/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue +++ b/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue @@ -95,7 +95,7 @@ watch( const init = () => { dvMainStore.initCurMultiplexingComponents() curMultiplexTargetComponentsInfo.value = [] - componentData.value.forEach(item => { + componentData.value?.forEach(item => { curMultiplexTargetComponentsInfo.value.push({ id: item.id, label: item.label, diff --git a/core/core-frontend/src/views/data-visualization/PreviewShow.vue b/core/core-frontend/src/views/data-visualization/PreviewShow.vue index c8297eb9af..ffb166e139 100644 --- a/core/core-frontend/src/views/data-visualization/PreviewShow.vue +++ b/core/core-frontend/src/views/data-visualization/PreviewShow.vue @@ -80,11 +80,13 @@ const loadCanvasData = (dvId, weight?) => { state.canvasViewInfoPreview = canvasViewInfoPreview state.dvInfo = dvInfo state.curPreviewGap = curPreviewGap - dvMainStore.updateCurDvInfo(dvInfo) dataInitState.value = true - nextTick(() => { - dvPreview.value?.restore() - }) + if (props.showPosition === 'preview') { + dvMainStore.updateCurDvInfo(dvInfo) + nextTick(() => { + dvPreview.value?.restore() + }) + } } ) } @@ -151,7 +153,9 @@ defineExpose({ }) onBeforeMount(() => { - dvMainStore.canvasDataInit() + if (props.showPosition === 'preview') { + dvMainStore.canvasDataInit() + } })