From b0af5aaec4d8e2d0fc0e76a1d6b376fbc419cf78 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 21 Jun 2024 15:24:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F=E5=A2=9E=E5=8A=A0=E5=88=BB?= =?UTF-8?q?=E5=BA=A6=E5=B0=BA=E6=8C=87=E7=A4=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/common/DeRuler.vue | 94 +++++++++++++++++++ .../src/views/data-visualization/index.vue | 32 ++++--- 2 files changed, 114 insertions(+), 12 deletions(-) create mode 100644 core/core-frontend/src/custom-component/common/DeRuler.vue diff --git a/core/core-frontend/src/custom-component/common/DeRuler.vue b/core/core-frontend/src/custom-component/common/DeRuler.vue new file mode 100644 index 0000000000..cd2a1fdb2b --- /dev/null +++ b/core/core-frontend/src/custom-component/common/DeRuler.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/core/core-frontend/src/views/data-visualization/index.vue b/core/core-frontend/src/views/data-visualization/index.vue index 0a8b62b65c..a7cf5d8277 100644 --- a/core/core-frontend/src/views/data-visualization/index.vue +++ b/core/core-frontend/src/views/data-visualization/index.vue @@ -39,6 +39,7 @@ import { Base64 } from 'js-base64' import CanvasCacheDialog from '@/components/visualization/CanvasCacheDialog.vue' import { deepCopy } from '@/utils/utils' import DvPreview from '@/views/data-visualization/DvPreview.vue' +import DeRuler from '@/custom-component/common/DeRuler.vue' const interactiveStore = interactiveStoreWithOut() const embeddedStore = useEmbedded() const { wsCache } = useCache() @@ -100,9 +101,6 @@ const contentStyle = computed(() => { } } else { return { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', width: width * 1.5 + 'px', height: height * 1.5 + 'px' } @@ -400,15 +398,17 @@ eventBus.on('handleNew', handleNew) @mousedown="handleMouseDown" @mouseup="deselectCurComponent" > - +
+ +
@@ -535,4 +535,12 @@ eventBus.on('handleNew', handleNew) height: 1px; background: #000; } + +.canvas-dv-inner { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; +}