From bab512c573fd30ff4e3a86bb57bc3f6613874edf Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sun, 15 May 2022 22:40:26 +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=E7=BC=96=E8=BE=91=E5=86=85=E5=AD=98=E4=BD=BF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/view/ChartEdit.vue | 14 +++++++++++++- frontend/src/views/panel/edit/index.vue | 16 ++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index ea098c9aae..450da9a788 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1298,6 +1298,11 @@ export default { type: String, required: false, default: 'view' + }, + editStatue: { + type: Boolean, + required: false, + default: false } }, data() { @@ -1416,10 +1421,17 @@ export default { } */ }, watch: { + 'editStatue': function(val) { + if (val && this.param.id !== this.preChartId) { + this.preChartId = this.param.id + this.chartInit() + // console.log('fromwatch:' + JSON.stringify(val)) + } + }, 'param': function(val) { if (this.param.optType === 'new') { // - } else if (this.param.id !== this.preChartId) { + } else if (this.param.id !== this.preChartId && this.editStatue) { this.preChartId = this.param.id this.chartInit() // console.log('fromwatch:' + JSON.stringify(val)) diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 380c0b7b9f..61de117100 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -24,7 +24,7 @@ -
+
@@ -204,9 +204,9 @@ - + -
-
- +
+
+
-
+
@@ -302,7 +302,7 @@ > - +