From 9f879a88b43800fe3e3cc351b7b5ad2bef1247c0 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 23 Nov 2021 12:51:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E6=9D=BF=E5=B1=95=E7=A4=BA=E8=BE=B9=E7=95=8C=E9=97=B4?= =?UTF-8?q?=E9=9A=99=EF=BC=8C=E4=BF=9D=E6=8C=81=E5=B8=B8=E6=9C=89=E9=97=B4?= =?UTF-8?q?=E9=9A=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Editor/ComponentWrapper.vue | 41 +++-- .../canvas/components/Editor/Preview.vue | 160 +++++++++--------- .../src/components/dataease/DeOutWidget.vue | 52 +++--- 3 files changed, 124 insertions(+), 129 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index 84acd7331f..6e87cbab95 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -5,7 +5,7 @@ @click="handleClick" @mousedown="elementMouseDown" > - + - diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index cf2b0eb7c1..cea20daf31 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -1,33 +1,41 @@ @@ -94,9 +102,7 @@ export default { }, computed: { customStyle() { - let style = { - padding: this.componentGap + 'px' - } + let style = {} if (this.canvasStyleData.openCommonStyle) { if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) { style = { @@ -110,16 +116,6 @@ export default { } } } - // if (this.canvasStyleData.selfAdaption) { - // style = { - // overflow: 'hidden', - // ...style - // } - // } - // style = { - // overflow-x :'hidden', - // ...style - // } return style }, // 此处单独计算componentData的值 不放入全局mapState中 @@ -152,17 +148,17 @@ export default { const _this = this const erd = elementResizeDetectorMaker() // 监听div变动事件 - const tempDom = document.getElementById('canvasInfoMain') - erd.listenTo(tempDom, element => { + const mainDom = document.getElementById('canvasInfoMain') + erd.listenTo(mainDom, element => { _this.$nextTick(() => { _this.restore() // 将mainHeight 修改为px 临时解决html2canvas 截图不全的问题 - _this.mainHeight = tempDom.scrollHeight + 'px!important' + _this.mainHeight = mainDom.scrollHeight + 'px!important' }) }) eventBus.$on('openChartDetailsDialog', this.openChartDetailsDialog) - this.$store.commit('clearLinkageSettingInfo', false) - this.canvasStyleDataInit() + _this.$store.commit('clearLinkageSettingInfo', false) + _this.canvasStyleDataInit() }, beforeDestroy() { clearInterval(this.timer) @@ -235,8 +231,6 @@ export default { } }, handleMouseDown() { - // console.log('handleMouseDown123') - this.$store.commit('setClickComponentStatus', false) } } @@ -244,47 +238,45 @@ export default { diff --git a/frontend/src/components/dataease/DeOutWidget.vue b/frontend/src/components/dataease/DeOutWidget.vue index 47316d13da..b8e1a03681 100644 --- a/frontend/src/components/dataease/DeOutWidget.vue +++ b/frontend/src/components/dataease/DeOutWidget.vue @@ -1,29 +1,31 @@