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