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 {