diff --git a/core/core-frontend/src/store/modules/data-visualization/copy.ts b/core/core-frontend/src/store/modules/data-visualization/copy.ts index 61f1602246..f4d984b12a 100644 --- a/core/core-frontend/src/store/modules/data-visualization/copy.ts +++ b/core/core-frontend/src/store/modules/data-visualization/copy.ts @@ -115,10 +115,10 @@ export const copyStore = defineStore('copy', { newComponent.canvasId = 'canvas-main' } dvMainStore.addCopyComponent(newComponent, idMap, copyDataTemp.copyCanvasViewInfo) + if (dvMainStore.multiplexingStyleAdapt && copyDataTemp.copyFrom === 'multiplexing') { + adaptCurThemeCommonStyle(newComponent) + } if (dvInfo.value.type === 'dashboard') { - if (dvMainStore.multiplexingStyleAdapt && copyDataTemp.copyFrom === 'multiplexing') { - adaptCurThemeCommonStyle(newComponent) - } eventBus.emit('addDashboardItem-' + newComponent.canvasId, newComponent) } if (i === dataArray.length - 1) { diff --git a/core/core-frontend/src/views/common/DeResourceTree.vue b/core/core-frontend/src/views/common/DeResourceTree.vue index d14853fd9b..58b1b1336c 100644 --- a/core/core-frontend/src/views/common/DeResourceTree.vue +++ b/core/core-frontend/src/views/common/DeResourceTree.vue @@ -164,7 +164,7 @@ const menuList = computed(() => { }) const dvId = embeddedStore.dvId || router.currentRoute.value.query.dvId -if (dvId) { +if (dvId && showPosition.value === 'preview') { selectedNodeKey.value = dvId returnMounted.value = true } diff --git a/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue b/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue index c5d2c42bcd..19e18000d1 100644 --- a/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue +++ b/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue @@ -2,6 +2,7 @@ import { computed, nextTick, onBeforeMount, reactive, ref, toRefs, watch } from 'vue' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { getCanvasStyle } from '@/utils/style' +import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue' const dvMainStore = dvMainStoreWithOut() const viewShow = ref(true) @@ -138,7 +139,7 @@ onBeforeMount(() => { class="custom-tree" menu ref="multiplexInfoTree" - :empty-text="'暂无可用图表'" + :empty-text="'暂无可用组件'" :filter-node-method="filterNodeMethod" :data="curMultiplexTargetComponentsInfo" node-key="targetViewId" @@ -184,6 +185,7 @@ onBeforeMount(() => { :dv-info="dvInfo" :canvas-view-info="canvasViewInfo" /> +