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 + ) +})