From 6cc9cc14e421574c8550b6b3ab0da35beb6d2974 Mon Sep 17 00:00:00 2001 From: junjie Date: Fri, 30 Jul 2021 11:54:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BE=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=E6=95=B0=E6=8D=AE=E9=9B=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/view/ChartEdit.vue | 10 ++++++---- frontend/src/views/chart/view/TableSelector.vue | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 208d59c7a6..b657d2fc5c 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1245,10 +1245,12 @@ export default { }, changeChart() { - this.view.tableId = this.changeTable.id - this.view.xaxis = [] - this.view.yaxis = [] - this.view.customFilter = [] + if (this.view.tableId !== this.changeTable.id) { + this.view.tableId = this.changeTable.id + this.view.xaxis = [] + this.view.yaxis = [] + this.view.customFilter = [] + } this.save(true, 'chart', false) }, diff --git a/frontend/src/views/chart/view/TableSelector.vue b/frontend/src/views/chart/view/TableSelector.vue index 53ac2d5629..0741875729 100644 --- a/frontend/src/views/chart/view/TableSelector.vue +++ b/frontend/src/views/chart/view/TableSelector.vue @@ -1,7 +1,7 @@