From d995078ad0528ca5983a1e0ca092cef93e53b502 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 15 Oct 2024 17:09:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E8=83=8C=E6=99=AF=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=92=8C=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/canvas/ComponentWrapper.vue | 8 +++++++- .../src/components/data-visualization/canvas/Shape.vue | 9 ++++++++- 2 files changed, 15 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 2351ce2304..99d09a8b5f 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -210,7 +210,13 @@ const componentBackgroundStyle = computed(() => { if (backgroundColorSelect && backgroundColor) { colorRGBA = backgroundColor } - if (backgroundImageEnable || (config.value.innerType === 'VQuery' && backgroundColorSelect)) { + if (config.value.innerType === 'VQuery' && backgroundColorSelect) { + if (backgroundType === 'outerImage' && typeof outerImage === 'string') { + style['background'] = `url(${imgUrlTrans(outerImage)}) no-repeat` + } else { + style['background-color'] = colorRGBA + } + } else if (backgroundImageEnable) { if (backgroundType === 'outerImage' && typeof outerImage === 'string') { style['background'] = `url(${imgUrlTrans(outerImage)}) no-repeat ${colorRGBA}` } else { 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 4165129d83..c838530947 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -876,7 +876,14 @@ const componentBackgroundStyle = computed(() => { if (backgroundColorSelect && backgroundColor) { colorRGBA = backgroundColor } - if (backgroundImageEnable || (element.value.innerType === 'VQuery' && backgroundColorSelect)) { + + if (element.value.innerType === 'VQuery' && backgroundColorSelect) { + if (backgroundType === 'outerImage' && typeof outerImage === 'string') { + style['background'] = `url(${imgUrlTrans(outerImage)}) no-repeat` + } else { + style['background-color'] = colorRGBA + } + } else if (backgroundImageEnable) { if (backgroundType === 'outerImage' && typeof outerImage === 'string') { style['background'] = `url(${imgUrlTrans(outerImage)}) no-repeat ${colorRGBA}` } else {