From 79f98896926b1568778b8bf8a40d8d6f313272aa Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Tue, 26 Dec 2023 15:09:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20Tab=20=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=97=B6=E9=87=8D=E6=96=B0=E6=B8=B2=E6=9F=93=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/customComponent/UserView.vue | 1 + core/frontend/src/views/chart/components/ChartComponentS2.vue | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue index ea961a8db9..eb90163773 100644 --- a/core/frontend/src/components/canvas/customComponent/UserView.vue +++ b/core/frontend/src/components/canvas/customComponent/UserView.vue @@ -655,6 +655,7 @@ export default { tabSwitch(tabCanvasId) { if (this.charViewS2ShowFlag && tabCanvasId === this.canvasId && this.$refs[this.element.propValue.id]) { // do nothing + this.$refs[this.element.propValue.id].chartResize() } }, // 编辑状态下 不启动刷新 diff --git a/core/frontend/src/views/chart/components/ChartComponentS2.vue b/core/frontend/src/views/chart/components/ChartComponentS2.vue index ae96b11a25..4b4243c187 100644 --- a/core/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/core/frontend/src/views/chart/components/ChartComponentS2.vue @@ -396,7 +396,8 @@ export default { const { width: chartWidth, height: chartHeight } = this.myChart.options if (width !== chartWidth || height !== chartHeight) { this.myChart?.changeSheetSize(width, height) - if (chartWidth || chartHeight) { + // 大小变化或者tab变化重新渲染 + if (chartWidth || chartHeight || !(chartHeight || chartWidth)) { this.myChart.render() } this.initScroll()