From f9a0ec3d202060e6721c0ec4d5761806e49d7b55 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 15 Sep 2021 18:11:05 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E4=BB=AA=E8=A1=A8=E6=9D=BF=E5=8F=AF?=
=?UTF-8?q?=E4=BB=A5=E8=87=AA=E5=8A=A8=E8=BF=9B=E8=A1=8C=E6=97=A0=E9=99=90?=
=?UTF-8?q?=E4=B8=8B=E6=8B=89=EF=BC=8C=E5=8F=96=E6=B6=88=E4=BB=AA=E8=A1=A8?=
=?UTF-8?q?=E6=9D=BF=E5=B0=BA=E5=AF=B8=E8=AE=BE=E7=BD=AE=EF=BC=8C=E7=BB=9F?=
=?UTF-8?q?=E4=B8=80=E4=B8=BA=E8=87=AA=E9=80=82=E5=BA=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/DeDrag/index.vue | 2 +-
.../canvas/components/Editor/Preview.vue | 27 ++++++++++++-------
.../canvas/components/Editor/index.vue | 12 ++++++---
.../components/canvas/components/Toolbar.vue | 14 +---------
frontend/src/store/index.js | 3 +++
frontend/src/views/panel/edit/index.vue | 3 +--
.../src/views/panel/list/PanelViewShow.vue | 2 +-
7 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue
index af6a34ce39..2a8f91e95c 100644
--- a/frontend/src/components/DeDrag/index.vue
+++ b/frontend/src/components/DeDrag/index.vue
@@ -610,7 +610,7 @@ export default {
const rect = this.$el.parentNode.getBoundingClientRect()
this.parentX = rect.x
this.parentY = rect.y
- return [Math.round(parseFloat(style.getPropertyValue('width'), 10)), Math.round(parseFloat(style.getPropertyValue('height'), 10))]
+ return [Math.round(parseFloat(style.getPropertyValue('width'), 10)), 100000]
}
if (typeof this.parent === 'string') {
const parentNode = document.querySelector(this.parent)
diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue
index 05800834fe..e73b426c00 100644
--- a/frontend/src/components/canvas/components/Editor/Preview.vue
+++ b/frontend/src/components/canvas/components/Editor/Preview.vue
@@ -110,12 +110,16 @@ export default {
}
}
}
- if (this.canvasStyleData.selfAdaption) {
- style = {
- overflow: 'hidden',
- ...style
- }
- }
+ // if (this.canvasStyleData.selfAdaption) {
+ // style = {
+ // overflow: 'hidden',
+ // ...style
+ // }
+ // }
+ // style = {
+ // overflow-x :'hidden',
+ // ...style
+ // }
return style
},
// 此处单独计算componentData的值 不放入全局mapState中
@@ -168,10 +172,13 @@ export default {
const canvasWidth = document.getElementById('canvasInfoTemp').offsetWidth
this.scaleWidth = canvasWidth * 100 / parseInt(this.canvasStyleData.width)// 获取宽度比
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.scaleHeight = this.scaleWidth
+ // this.mainHeight = this.canvasStyleData.height * this.scaleHeight / 100 + 'px'
+ // if (this.showType === 'width') {
+ // this.scaleHeight = this.scaleWidth
+ // this.mainHeight = this.canvasStyleData.height * this.scaleHeight / 100 + 'px'
+ // }
this.handleScaleChange()
},
resetID(data) {
diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue
index ca686fc356..fdc534aa08 100644
--- a/frontend/src/components/canvas/components/Editor/index.vue
+++ b/frontend/src/components/canvas/components/Editor/index.vue
@@ -12,7 +12,7 @@
@mousedown="handleMouseDown"
>
-