From 674ac7dda16c1525a59ac980d75e33ebdb33986b Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 25 Sep 2024 16:13:22 +0800
Subject: [PATCH 1/2] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E9=83=A8=E5=88=86=E7=BB=84=E4=BB=B6=E7=BC=A9=E6=94=BE?=
=?UTF-8?q?=E5=90=8E=E5=81=B6=E7=8E=B0=E5=AD=97=E4=BD=93=E6=A8=A1=E7=B3=8A?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=20#12138=20#12098=20#12148?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/core-frontend/src/custom-component/user-view/Component.vue | 2 +-
core/core-frontend/src/custom-component/v-query/Component.vue | 2 +-
.../chart/components/views/components/ChartComponentS2.vue | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/core-frontend/src/custom-component/user-view/Component.vue b/core/core-frontend/src/custom-component/user-view/Component.vue
index 74187ef5fa..e0d576e648 100644
--- a/core/core-frontend/src/custom-component/user-view/Component.vue
+++ b/core/core-frontend/src/custom-component/user-view/Component.vue
@@ -65,7 +65,7 @@ const autoStyle = computed(() => {
width: 100 / scale.value + '%!important',
left: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
top: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
- transform: 'scale(' + scale.value + ')'
+ transform: 'scale(' + scale.value + ') translateZ(0)'
} as CSSProperties
} else {
return {}
diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue
index 02776ec0b9..dab464a24f 100644
--- a/core/core-frontend/src/custom-component/v-query/Component.vue
+++ b/core/core-frontend/src/custom-component/v-query/Component.vue
@@ -536,7 +536,7 @@ const autoStyle = computed(() => {
width: 100 / scale.value + '%!important',
left: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
top: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
- transform: 'scale(' + scale.value + ')',
+ transform: 'scale(' + scale.value + ') translateZ(0)',
opacity: element.value?.style?.opacity || 1
} as CSSProperties
})
diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
index d7380d1ab8..5804d6f1f5 100644
--- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
+++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
@@ -596,7 +596,7 @@ const autoStyle = computed(() => {
height: 20 * scale.value + 8 + 'px',
width: 100 / scale.value + '%!important',
left: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
- transform: 'scale(' + scale.value + ')'
+ transform: 'scale(' + scale.value + ') translateZ(0)'
}
})
From 6c9a65bbac090ee1a47ba27685179da38830f924 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Thu, 26 Sep 2024 10:34:11 +0800
Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=8C=E6=96=87?=
=?UTF-8?q?=E6=9C=AC=E8=A1=A8=E6=A0=BC=E6=8B=96=E5=8A=A8=E7=9B=B8=E5=85=B3?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../rich-text/DeRichTextView.vue | 32 ++++++++++++++++++-
.../custom-component/user-view/Component.vue | 25 ++++++++-------
.../views/chart/components/views/index.vue | 1 +
3 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue
index 9d862c47bd..63063d3e34 100644
--- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue
+++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue
@@ -6,6 +6,7 @@
@keyup.stop
@dblclick="setEdit"
@click="onClick"
+ :style="richTextStyle"
>
{
@@ -561,6 +583,8 @@ const conditionAdaptor = (chart: Chart) => {
return res
}
+const richTextStyle = computed(() => [{ '--de-canvas-scale': props.scale }])
+
onMounted(() => {
viewInit()
})
@@ -583,6 +607,12 @@ defineExpose({
width: 0px !important;
height: 0px !important;
}
+ ::v-deep(p) {
+ zoom: var(--de-canvas-scale);
+ }
+ ::v-deep(span) {
+ zoom: var(--de-canvas-scale);
+ }
}
:deep(.ol) {
diff --git a/core/core-frontend/src/custom-component/user-view/Component.vue b/core/core-frontend/src/custom-component/user-view/Component.vue
index e0d576e648..b43a501d71 100644
--- a/core/core-frontend/src/custom-component/user-view/Component.vue
+++ b/core/core-frontend/src/custom-component/user-view/Component.vue
@@ -58,18 +58,19 @@ const props = defineProps({
const { element, view, active, searchCount, scale } = toRefs(props)
const autoStyle = computed(() => {
- if (element.value.innerType === 'rich-text') {
- return {
- position: 'absolute',
- height: 100 / scale.value + '%!important',
- width: 100 / scale.value + '%!important',
- left: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
- top: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
- transform: 'scale(' + scale.value + ') translateZ(0)'
- } as CSSProperties
- } else {
- return {}
- }
+ return {}
+ // if (element.value.innerType === 'rich-text') {
+ // return {
+ // position: 'absolute',
+ // height: 100 / scale.value + '%!important',
+ // width: 100 / scale.value + '%!important',
+ // left: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
+ // top: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
+ // transform: 'scale(' + scale.value + ') translateZ(0)'
+ // } as CSSProperties
+ // } else {
+ // return {}
+ // }
})
const emits = defineEmits(['onPointClick'])
diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue
index eefe17263b..913e832f46 100644
--- a/core/core-frontend/src/views/chart/components/views/index.vue
+++ b/core/core-frontend/src/views/chart/components/views/index.vue
@@ -944,6 +944,7 @@ const loadPluginCategory = data => {