From d89efc707d68983273dbe6a845388b1296c4266f Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 16 Jun 2021 16:55:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E7=9B=98=20=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/Editor/Preview.vue | 9 ++++++--- .../canvas/components/Editor/PreviewFullScreen.vue | 2 +- frontend/src/views/panel/edit/index.vue | 2 +- frontend/src/views/panel/list/PanelViewShow.vue | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index 2428dca442..7234cf5eab 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -55,15 +55,17 @@ export default { scaleWidth: '100', scaleHeight: '100', timer: null, - componentDataShow: [] + componentDataShow: [], + mainWidth: '100%', + mainHeight: '100%' } }, computed: { customStyle() { let style = { margin: 'auto', - width: '100%', - height: '100%' + width: this.mainWidth, + height: this.mainHeight } if (this.canvasStyleData.openCommonStyle) { if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) { @@ -122,6 +124,7 @@ export default { this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)// 获取高度比 if (this.showType === 'width') { this.scaleHeight = this.scaleWidth + this.mainHeight = this.canvasStyleData.height * this.scaleHeight / 100 + 'px' } this.handleScaleChange() }, diff --git a/frontend/src/components/canvas/components/Editor/PreviewFullScreen.vue b/frontend/src/components/canvas/components/Editor/PreviewFullScreen.vue index de99c92323..7cd783afda 100644 --- a/frontend/src/components/canvas/components/Editor/PreviewFullScreen.vue +++ b/frontend/src/components/canvas/components/Editor/PreviewFullScreen.vue @@ -1,6 +1,6 @@