From 49de89ebe4c63e304a5c6d598fada2e163b0c988 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 24 Mar 2025 11:55:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81=E5=86=BB=E7=BB=93=E5=9C=A8?= =?UTF-8?q?=E9=A1=B6=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/ComponentWrapper.vue | 32 +++++++++++++++++-- .../data-visualization/canvas/DePreview.vue | 13 ++++++-- .../views/dashboard/DashboardPreviewShow.vue | 13 ++++++-- .../data-visualization/PreviewCanvas.vue | 14 +++++--- 4 files changed, 60 insertions(+), 12 deletions(-) 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 cca9034bdd..22cbbd96f2 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -12,7 +12,7 @@ import Board from '@/components/de-board/Board.vue' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { activeWatermarkCheckUser, removeActiveWatermark } from '@/components/watermark/watermark' import { isMobile } from '@/utils/utils' -import { isDashboard } from '@/utils/canvasUtils' +import { isDashboard, isMainCanvas } from '@/utils/canvasUtils' import { XpackComponent } from '@/components/plugin' import { useAppStoreWithOut } from '@/store/modules/app' import DePreviewPopDialog from '@/components/visualization/DePreviewPopDialog.vue' @@ -124,6 +124,11 @@ const props = defineProps({ optType: { type: String, required: false + }, + // 画布滚动距离 + scrollMain: { + type: Number, + default: 0 } }) const { @@ -135,7 +140,8 @@ const { dvInfo, searchCount, scale, - suffixId + suffixId, + scrollMain } = toRefs(props) let currentInstance const component = ref(null) @@ -359,12 +365,25 @@ const initOpenHandler = newWindow => { } const deepScale = computed(() => scale.value / 100) const showActive = computed(() => props.popActive || (dvMainStore.mobileInPc && props.active)) + +const freezeFlag = computed(() => { + return ( + isMainCanvas(props.canvasId) && + config.value.freeze && + scrollMain.value - config.value.style?.top > 0 + ) +})