fix: 修复编辑草稿时重复创建新草稿的问题

- showAddModal 不再重置 currentDraftId
- 编辑已有草稿时会更新该草稿而不是创建新草稿
This commit is contained in:
2026-04-19 18:08:00 +08:00
parent 7d3c5c2ae1
commit c9433a5e98

View File

@@ -1860,8 +1860,8 @@ function showAddModal(type) {
// 设置类型
document.getElementById('addType').value = type;
// 重置草稿ID
currentDraftId = null;
// 只有不是编辑草稿时才重置
// currentDraftId 在 editDraft 中已设置,不要覆盖
// 设置弹窗标题和图标
const typeInfo = {