NEZ-3234 fix:修复markdown输入框 没内容时cancel未删除图表

This commit is contained in:
zyh
2023-10-20 17:24:48 +08:00
parent 5563e4ed79
commit 25c7e314af

View File

@@ -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