From 11515a5aeb40aad805b84fd28a22317e9c86db82 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 8 Dec 2021 15:28:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=97=B6=E5=8F=B3=E4=BE=A7=E8=BE=B9=E6=A1=86=E9=97=B4?= =?UTF-8?q?=E9=9A=94=E8=BF=87=E5=A4=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/components/Editor/Preview.vue | 10 +++------- frontend/src/views/panel/edit/index.vue | 4 +++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index ccdf7bcd8e..19a7ea3f1e 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -213,8 +213,8 @@ export default { restore() { const canvasHeight = document.getElementById('canvasInfoMain').offsetHeight const canvasWidth = document.getElementById('canvasInfoMain').offsetWidth - this.scaleWidth = canvasWidth * 100 / parseInt(this.canvasStyleData.width)// 获取宽度比 - this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)// 获取高度比 + this.scaleWidth = (canvasWidth) * 100 / this.canvasStyleData.width // 获取宽度比 + this.scaleHeight = canvasHeight * 100 / this.canvasStyleData.height// 获取高度比 this.handleScaleChange() }, resetID(data) { @@ -226,7 +226,7 @@ export default { return data }, format(value, scale) { - return value * parseInt(scale) / 100 + return value * scale / 100 }, handleScaleChange() { if (this.componentData) { @@ -296,10 +296,6 @@ export default { color: #9ea6b2; } - .gap_class { - padding: 5px; - } - .dialog-css > > > .el-dialog__title { font-size: 14px; } diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 7064aee29b..6b52cd3818 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -321,7 +321,9 @@ export default { return !this.linkageSettingStatus && !this.mobileLayoutStatus }, showAttr() { - if (this.curComponent && this.showAttrComponent.includes(this.curComponent.type)) { + if (this.mobileLayoutStatus) { + return false + } else if (this.curComponent && this.showAttrComponent.includes(this.curComponent.type)) { // 过滤组件有标题才显示 if (this.curComponent.type === 'custom' && !this.curComponent.options.attrs.title) { return false