From d0e91241a5c4b516db87ce52dee6ef0258485e62 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 29 Dec 2023 19:11:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=BB=84=E5=90=88=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=A2=84=E8=A7=88=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/group/GroupPreview.vue | 12 +++++++++++- core/core-frontend/src/utils/canvasUtils.ts | 6 ------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/core/core-frontend/src/custom-component/group/GroupPreview.vue b/core/core-frontend/src/custom-component/group/GroupPreview.vue index e60ae2e4f9..818da933b5 100644 --- a/core/core-frontend/src/custom-component/group/GroupPreview.vue +++ b/core/core-frontend/src/custom-component/group/GroupPreview.vue @@ -3,6 +3,7 @@ import { toRefs } from 'vue' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { storeToRefs } from 'pinia' import ComponentWrapper from '@/components/data-visualization/canvas/ComponentWrapper.vue' +import { toPercent } from '@/utils/translate' const dvMainStore = dvMainStoreWithOut() const { canvasViewInfo } = storeToRefs(dvMainStore) @@ -37,6 +38,15 @@ const props = defineProps({ }) const { propValue, dvInfo, searchCount } = toRefs(props) + +const customGroupStyle = item => { + return { + width: toPercent(item.groupStyle.width), + height: toPercent(item.groupStyle.height), + top: toPercent(item.groupStyle.top), + left: toPercent(item.groupStyle.left) + } +}