From 44c8e50f07bfc8dce70c42d919d8049392b7ea59 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 26 Apr 2022 18:50:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=89=93=E4=B8=8D=E5=BC=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/background/index.vue | 3 ++- frontend/src/views/panel/edit/index.vue | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/background/index.vue b/frontend/src/views/background/index.vue index cdec3808a9..9a6a14a525 100644 --- a/frontend/src/views/background/index.vue +++ b/frontend/src/views/background/index.vue @@ -110,6 +110,7 @@ import { mapState } from 'vuex' import { deepCopy } from '@/components/canvas/utils/utils' import { COLOR_PANEL } from '@/views/chart/chart/chart' import { uploadFileResult } from '@/api/staticResource/staticResource' +import { COMMON_BACKGROUND_NONE } from '@/components/canvas/custom-component/component-list' export default { name: 'Background', @@ -144,7 +145,7 @@ export default { if (this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') { this.fileList.push({ url: this.curComponent.commonBackground.outerImage }) } - this.backgroundOrigin = deepCopy(this.curComponent.commonBackground) + this.backgroundOrigin = deepCopy(this.curComponent.commonBackground ? this.curComponent.commonBackground : COMMON_BACKGROUND_NONE) this.queryBackground() }, queryBackground() { diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index f748bc5699..380c0b7b9f 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -949,6 +949,7 @@ export default { hyperlinks: HYPERLINKS, mobileStyle: BASE_MOBILE_STYLE, propValue: fileResult, + commonBackground: deepCopy(COMMON_BACKGROUND), style: { ...commonStyle }