From d25e764fda579c6c4619c1f3553f309837613fb1 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Tue, 1 Mar 2022 16:16:09 +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/components/canvas/components/TextAttr.vue | 4 ++--
frontend/src/views/background/BackgroundItem.vue | 4 ++--
frontend/src/views/background/index.vue | 2 +-
frontend/src/views/panel/edit/index.vue | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue
index 25bf2e313d..f7bbb170ee 100644
--- a/frontend/src/components/canvas/components/TextAttr.vue
+++ b/frontend/src/components/canvas/components/TextAttr.vue
@@ -450,10 +450,10 @@ export default {
::v-deep input::-webkit-outer-spin-button,
::v-deep input::-webkit-inner-spin-button {
- /*-webkit-appearance: none !important;*/
+ -webkit-appearance: none !important;
}
::v-deep input[type='number'] {
- /*-moz-appearance: textfield !important;*/
+ -moz-appearance: textfield !important;
}
diff --git a/frontend/src/views/background/BackgroundItem.vue b/frontend/src/views/background/BackgroundItem.vue
index 1ec6e0a3ae..c4a0250398 100644
--- a/frontend/src/views/background/BackgroundItem.vue
+++ b/frontend/src/views/background/BackgroundItem.vue
@@ -10,7 +10,7 @@
:style="classBackground"
@click.stop="setBoard"
/>
- {{ template.name }}
+ {{ template.name }}
@@ -29,7 +29,7 @@ export default {
},
computed: {
itemActive() {
- return this.curComponent.commonBackground.innerImage === this.template.url
+ return 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 9807d56b51..fc5eaa7d0d 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.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
+ if (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)
diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue
index a88ae63a8b..093612249d 100644
--- a/frontend/src/views/panel/edit/index.vue
+++ b/frontend/src/views/panel/edit/index.vue
@@ -619,7 +619,7 @@ export default {
this.currentFilterCom.id = newComponentId
this.currentFilterCom.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix
this.currentFilterCom.mobileStyle = BASE_MOBILE_STYLE
- this.currentFilterCom.commonBackground || deepCopy(COMMON_BACKGROUND)
+ this.currentFilterCom.commonBackground = this.currentFilterCom.commonBackground || deepCopy(COMMON_BACKGROUND)
if (this.currentWidget.filterDialog) {
this.show = false
@@ -649,7 +649,7 @@ export default {
// 新拖入的组件矩阵状态 和仪表板当前的矩阵状态 保持一致
component.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix
// 统一设置背景信息
- component.commonBackground || deepCopy(COMMON_BACKGROUND)
+ component.commonBackground = component.commonBackground || deepCopy(COMMON_BACKGROUND)
// 视图统一调整为复制
if (componentInfo.type === 'view') {