From b5b353ce72ccb30c76958ff632590fb1fb8805b5 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 12 Dec 2023 17:06:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=BB=E5=B8=83=E6=94=BE=E5=A4=A7?= =?UTF-8?q?=E7=BC=A9=E5=B0=8F=E5=85=B6=E8=A7=86=E5=9B=BE=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=B9=B6=E5=90=8C=E6=AF=94=E6=94=BE=E5=A4=A7=E7=BC=A9=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/canvas/CanvasCore.vue | 8 ++++++- .../canvas/ComponentWrapper.vue | 4 +++- .../data-visualization/canvas/Shape.vue | 10 +++++++-- .../custom-component/user-view/Component.vue | 15 +++++++------ .../views/components/ChartComponentG2Plot.vue | 13 +++++++----- .../views/components/ChartComponentS2.vue | 21 ++++++++++++++++--- .../views/chart/components/views/index.vue | 17 ++++++++++++--- 7 files changed, 65 insertions(+), 23 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index a36fa7de9c..4575f25e47 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -137,6 +137,11 @@ const props = defineProps({ default() { return {} } + }, + scale: { + type: Number, + required: false, + default: 1 } }) @@ -191,7 +196,7 @@ const curComponentId = computed(() => { const { emitter } = useEmitt() const curScale = computed(() => { - return canvasStyleData.value.scale + return canvasStyleData.value.scale / 100 }) const pointShadowShow = computed(() => { @@ -1269,6 +1274,7 @@ defineExpose({ v-for="(item, index) in componentData" v-show="item.isShow" :canvas-id="canvasId" + :scale="curScale" :key="item.id" :default-style="item.style" :style="getShapeItemShowStyle(item)" 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 46cd03f741..3a75b7d178 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -164,6 +164,8 @@ const commonBackgroundSvgInner = computed(() => { return null } }) + +const deepScale = computed(() => scale.value / 100)