From bb51c676d8ce3d65fab35602d66c8011be23af66 Mon Sep 17 00:00:00 2001 From: fit2cloudrd Date: Tue, 5 Jul 2022 17:23:11 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E8=A7=86=E5=9B=BE):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=AC=A6=E5=8F=B7=E5=9C=B0=E5=9B=BE=E5=AF=B9=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F=E7=9A=84=E9=80=82?= =?UTF-8?q?=E9=85=8D=20(#2588)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wangjiahao <1522128093@qq.com> --- .../components/canvas/components/Editor/ComponentWrapper.vue | 4 ++++ frontend/src/components/canvas/components/Editor/index.vue | 1 + frontend/src/views/background/index.vue | 2 +- frontend/src/views/chart/components/ChartComponentS2.vue | 2 +- frontend/src/views/chart/components/table/TableNormal.vue | 4 ++-- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index 9c5869e8d5..22b901c00d 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -24,6 +24,7 @@ :is="config.component" v-else ref="wrapperChild" + class="component" :out-style="config.style" :style="getComponentStyleDefault(config.style)" :prop-value="config.propValue" @@ -268,4 +269,7 @@ export default { .main_view{ background-size: 100% 100%!important; } + .component{ + position: relative; + } diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 4296e4d690..ba85549b82 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -1681,6 +1681,7 @@ export default { outline: none; width: 100%; height: 100%; + position: relative; } } diff --git a/frontend/src/views/background/index.vue b/frontend/src/views/background/index.vue index 8f433ad1a9..c1659f9d3b 100644 --- a/frontend/src/views/background/index.vue +++ b/frontend/src/views/background/index.vue @@ -12,7 +12,7 @@ {{ $t('panel.inner_padding') }} - + diff --git a/frontend/src/views/chart/components/ChartComponentS2.vue b/frontend/src/views/chart/components/ChartComponentS2.vue index 0c93bcb5ca..3275054a00 100644 --- a/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/frontend/src/views/chart/components/ChartComponentS2.vue @@ -389,7 +389,7 @@ export default { this.myChart.store.set('scrollY', this.scrollTop) this.myChart.render() - if (senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) { + if (senior && senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) { const rowHeight = customAttr.size.tableItemHeight const headerHeight = customAttr.size.tableTitleHeight diff --git a/frontend/src/views/chart/components/table/TableNormal.vue b/frontend/src/views/chart/components/table/TableNormal.vue index 8fe83af248..2f10327909 100644 --- a/frontend/src/views/chart/components/table/TableNormal.vue +++ b/frontend/src/views/chart/components/table/TableNormal.vue @@ -148,7 +148,7 @@ export default { eventBus.$on('resizing', this.chartResize) }, beforeDestroy() { - eventBus.$off('resizing',this.chartResize) + eventBus.$off('resizing', this.chartResize) clearInterval(this.scrollTimer) }, methods: { @@ -387,7 +387,7 @@ export default { }) }, 0) - if (senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) { + if (senior && senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) { let rowHeight = customAttr.size.tableItemHeight if (rowHeight < 36) { rowHeight = 36