From 59f72ec85b12a342abb5a6c408df03316505c115 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 13 Nov 2024 15:25:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):?= =?UTF-8?q?=20=E6=97=A5=E6=9C=9F=E7=B1=BB=E5=9E=8B=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=EF=BC=8C=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=EF=BC=8C=E6=97=A0=E6=B3=95=E5=88=9B=E5=BB=BA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v-query/QueryConditionConfiguration.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index b1c4c22d5a..8fc8699127 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -266,11 +266,14 @@ const showTypeError = computed(() => { ele => checkId === ele.id ) if (!field) return false - if (displayTypeField === null) { + if (displayTypeField === null && Array.isArray(field.type)) { displayTypeField = field return false } if (displayTypeField?.deType === field?.deType && displayTypeField?.deType === 1) { + if (!Array.isArray(field.type)) { + return false + } if (!displayTypeField.type?.length && !field.type?.length) { return false } @@ -1243,11 +1246,14 @@ const validate = () => { itx => checkId === itx.id ) if (!field) return false - if (displayTypeField === null) { + if (displayTypeField === null && Array.isArray(field.type)) { displayTypeField = field return false } if (displayTypeField?.deType === field?.deType && displayTypeField?.deType === 1) { + if (!Array.isArray(field.type)) { + return false + } if (!displayTypeField.type?.length && !field.type?.length) { return false } From 7af50e75d1c98e70292dd987872f51dc044d238a Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 13 Nov 2024 16:00:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):?= =?UTF-8?q?=20=E5=8F=AF=E4=BB=A5=E8=AE=BE=E7=BD=AE=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=E5=86=85=E8=BE=B9=E8=B7=9D=20#12960?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/ComponentWrapper.vue | 15 ++++++++++++++- .../data-visualization/canvas/Shape.vue | 16 +++++++++++++++- .../editor/editor-style/VQueryChartStyle.vue | 2 ++ 3 files changed, 31 insertions(+), 2 deletions(-) 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 855b2eade8..5fdc5575af 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -203,7 +203,7 @@ const componentBackgroundStyle = computed(() => { innerPadding, borderRadius } = config.value.commonBackground - const style = { + let style = { padding: innerPadding * deepScale.value + 'px', borderRadius: borderRadius + 'px' } @@ -211,6 +211,19 @@ const componentBackgroundStyle = computed(() => { if (backgroundColorSelect && backgroundColor) { colorRGBA = backgroundColor } + if (config.value.innerType === 'VQuery') { + if (backgroundColorSelect) { + style = { + padding: innerPadding * deepScale.value + 'px', + borderRadius: borderRadius + 'px' + } + } else { + style = { + padding: 12 * deepScale.value + 'px', + borderRadius: '0' + } + } + } if (config.value.innerType === 'VQuery' && backgroundColorSelect) { if (backgroundType === 'outerImage' && typeof outerImage === 'string') { style['background'] = `url(${imgUrlTrans(outerImage)}) no-repeat` diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index c52d273136..f55b9e2de0 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -886,7 +886,7 @@ const componentBackgroundStyle = computed(() => { borderRadius } = element.value.commonBackground const innerPaddingTarget = ['Group'].includes(element.value.component) ? 0 : innerPadding - const style = { + let style = { padding: innerPaddingTarget * scale.value + 'px', borderRadius: borderRadius + 'px' } @@ -895,6 +895,20 @@ const componentBackgroundStyle = computed(() => { colorRGBA = backgroundColor } + if (element.value.innerType === 'VQuery') { + if (backgroundColorSelect) { + style = { + padding: innerPadding * scale.value + 'px', + borderRadius: borderRadius + 'px' + } + } else { + style = { + padding: 12 * scale.value + 'px', + borderRadius: '0' + } + } + } + if (element.value.innerType === 'VQuery' && backgroundColorSelect) { if (backgroundType === 'outerImage' && typeof outerImage === 'string') { style['background'] = `url(${imgUrlTrans(outerImage)}) no-repeat` diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/VQueryChartStyle.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/VQueryChartStyle.vue index 485e5ff155..e6641a4ed9 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/VQueryChartStyle.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/VQueryChartStyle.vue @@ -315,6 +315,7 @@ initParams() >