From ac628cbf181845c32aa39ae65eec1d56fd4e0cb0 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 29 Aug 2022 04:30:37 -0400 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE-=E6=B0=94=E6=B3=A1?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE):=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=94=BE?= =?UTF-8?q?=E5=A4=A7=E6=9F=A5=E7=9C=8B=E6=B0=94=E6=B3=A1=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=A8=A1=E7=B3=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/custom-component/UserViewDialog.vue | 8 ++++---- .../canvas/custom-component/UserViewMobileDialog.vue | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserViewDialog.vue b/frontend/src/components/canvas/custom-component/UserViewDialog.vue index c0ea007e19..ccb213a15c 100644 --- a/frontend/src/components/canvas/custom-component/UserViewDialog.vue +++ b/frontend/src/components/canvas/custom-component/UserViewDialog.vue @@ -3,12 +3,12 @@
- @@ -42,7 +42,7 @@ import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import { exportDetails, innerExportDetails } from '@/api/panel/panel' import html2canvas from 'html2canvasde' import { hexColorToRGBA } from '@/views/chart/chart/util' -import {deepCopy, exportImg, imgUrlTrans} from '@/components/canvas/utils/utils' +import { deepCopy, exportImg, imgUrlTrans } from '@/components/canvas/utils/utils' import { getLinkToken, getToken } from '@/utils/auth' export default { name: 'UserViewDialog', @@ -101,7 +101,7 @@ export default { }, svgInnerEnable() { - return !this.screenShot&&this.element.commonBackground.enable && this.element.commonBackground.backgroundType === 'innerImage' && typeof this.element.commonBackground.innerImage === 'string' + return !this.screenShot && this.element.commonBackground.enable && this.element.commonBackground.backgroundType === 'innerImage' && typeof this.element.commonBackground.innerImage === 'string' }, mainSlotSvgInner() { if (this.svgInnerEnable) { @@ -124,7 +124,7 @@ export default { } if (this.element.commonBackground.enable) { if (this.screenShot && this.element.commonBackground.backgroundType === 'innerImage' && typeof this.element.commonBackground.innerImage === 'string') { - let innerImage = this.element.commonBackground.innerImage.replace('svg', 'png') + const innerImage = this.element.commonBackground.innerImage.replace('svg', 'png') style['background'] = `url(${imgUrlTrans(innerImage)}) no-repeat ${colorRGBA}` } else if (this.element.commonBackground.backgroundType === 'outerImage' && typeof this.element.commonBackground.outerImage === 'string') { style['background'] = `url(${imgUrlTrans(this.element.commonBackground.outerImage)}) no-repeat ${colorRGBA}` diff --git a/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue b/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue index 5c2f5cdc84..79c13760da 100644 --- a/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue +++ b/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue @@ -7,6 +7,7 @@ :component-name="chart.type + '-view'" :obj="{chart: mapChart || chart}" :chart="mapChart || chart" + :theme-style="element.commonBackground" class="chart-class" /> @@ -34,8 +35,8 @@ import DeContainer from '@/components/dataease/DeContainer' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import ChartComponentS2 from '@/views/chart/components/ChartComponentS2' import PluginCom from '@/views/system/plugin/PluginCom' -import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils' -import {hexColorToRGBA} from "@/views/chart/chart/util"; +import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils' +import { hexColorToRGBA } from '@/views/chart/chart/util' export default { name: 'UserViewMobileDialog', components: { ChartComponentS2, LabelNormalText, DeContainer, DeMainContainer, ChartComponentG2, ChartComponent, TableNormal, LabelNormal, PluginCom }, @@ -83,7 +84,7 @@ export default { }, svgInnerEnable() { - return !this.screenShot&&this.element.commonBackground.enable && this.element.commonBackground.backgroundType === 'innerImage' && typeof this.element.commonBackground.innerImage === 'string' + return !this.screenShot && this.element.commonBackground.enable && this.element.commonBackground.backgroundType === 'innerImage' && typeof this.element.commonBackground.innerImage === 'string' }, mainSlotSvgInner() { if (this.svgInnerEnable) { @@ -106,7 +107,7 @@ export default { } if (this.element.commonBackground.enable) { if (this.screenShot && this.element.commonBackground.backgroundType === 'innerImage' && typeof this.element.commonBackground.innerImage === 'string') { - let innerImage = this.element.commonBackground.innerImage.replace('svg', 'png') + const innerImage = this.element.commonBackground.innerImage.replace('svg', 'png') style['background'] = `url(${imgUrlTrans(innerImage)}) no-repeat ${colorRGBA}` } else if (this.element.commonBackground.backgroundType === 'outerImage' && typeof this.element.commonBackground.outerImage === 'string') { style['background'] = `url(${imgUrlTrans(this.element.commonBackground.outerImage)}) no-repeat ${colorRGBA}`