fix: 修复草稿出现上一次内容的情况

This commit is contained in:
kuaifan 2025-03-27 17:03:26 +08:00
parent f750a6aec2
commit 72e475cb84

View File

@ -695,8 +695,12 @@ export default {
return this.dialogId > 0 ? (this.cacheDialogs.find(({id}) => id == this.dialogId) || {}) : {};
},
draftId() {
return this.dialogId || `t_${this.taskId}`
},
draftData() {
return this.getDialogDraft(this.dialogId)?.content || ''
return this.getDialogDraft(this.draftId)?.content || ''
},
quoteData() {
@ -727,7 +731,7 @@ export default {
}
}
if (!this.simpleMode) {
this.$store.dispatch("saveDialogDraft", {id: this.dialogId, content: val})
this.$store.dispatch("saveDialogDraft", {id: this.draftId, content: val})
}
},