From 25c7e314af5034aea25cdc49269e43edd9f671b0 Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 20 Oct 2023 17:24:48 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-3234=20fix=EF=BC=9A=E4=BF=AE=E5=A4=8Dmarkdo?= =?UTF-8?q?wn=E8=BE=93=E5=85=A5=E6=A1=86=20=E6=B2=A1=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=97=B6cancel=E6=9C=AA=E5=88=A0=E9=99=A4=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/chart/chart/chartText.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/chart/chart/chartText.vue b/nezha-fronted/src/components/chart/chart/chartText.vue index 2a522ab22..e28c36a36 100644 --- a/nezha-fronted/src/components/chart/chart/chartText.vue +++ b/nezha-fronted/src/components/chart/chart/chartText.vue @@ -50,8 +50,15 @@ export default { this.chartInfo.param.oldText = this.chartInfo.param.text }, cancel () { - this.chartInfo.param.isEdit = false - this.chartInfo.param.text = this.chartInfo.param.oldText + if (this.chartInfo.param.oldText) { + this.chartInfo.param.isEdit = false + this.chartInfo.param.text = this.chartInfo.param.oldText + } else { + this.$store.dispatch('dispatchDelChart', { + chart: this.chartInfo, + type: 'delete' + }) + } }, textChange (val) { this.chartInfo.param.text = val