From 2b41447a1bebeffa44ed4ad5e9e703d62cfebdfc Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 1 Mar 2022 16:51:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BE=B9=E6=A1=86?= =?UTF-8?q?=E9=80=89=E4=B8=8D=E4=B8=8A=E7=9A=84=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/BackgroundItem.vue | 2 +- frontend/src/views/background/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/background/BackgroundItem.vue b/frontend/src/views/background/BackgroundItem.vue index c4a0250398..8acecde821 100644 --- a/frontend/src/views/background/BackgroundItem.vue +++ b/frontend/src/views/background/BackgroundItem.vue @@ -29,7 +29,7 @@ export default { }, computed: { itemActive() { - return this.curComponent.commonBackground && this.curComponent.commonBackground.innerImage === this.template.url + return this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.innerImage === this.template.url }, classBackground() { if (this.template.url) { diff --git a/frontend/src/views/background/index.vue b/frontend/src/views/background/index.vue index fc5eaa7d0d..b4643e8a7f 100644 --- a/frontend/src/views/background/index.vue +++ b/frontend/src/views/background/index.vue @@ -102,7 +102,7 @@ export default { } }, mounted() { - if (this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') { + 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)