fix(biji-qianduan): 修复保存成功后不退出编辑页面等问题

- 注释掉保存成功后退出编辑页面的代码- 注释掉保存成功后清空 editData 的代码
-优化 NoteEditor 组件中的保存逻辑
- 修复保存失败时的错误提示信息
This commit is contained in:
2025-08-14 14:58:48 +08:00
parent 56465ffa75
commit bdc8387958
3 changed files with 10 additions and 11 deletions

View File

@@ -276,7 +276,8 @@ const handleEditorBack = (data) => {
const handleSaveSuccess = (updatedFile) => {
selectedFile.value = updatedFile;
showEditor.value = false;
// 修复:保存成功后不退出编辑页面
// showEditor.value = false;
const index = groupMarkdownFiles.value.findIndex(f => f.id === updatedFile.id);
if (index !== -1) {
@@ -290,7 +291,8 @@ const handleSaveSuccess = (updatedFile) => {
// 延迟清空 editData确保所有响应式更新完成后再清理状态
// Delay clearing editData to ensure all reactive updates are complete before cleaning up the state.
setTimeout(() => {
resetEdit();
// 修复保存成功后不清空editData保持编辑状态
// resetEdit();
}, 100); // A short delay is usually sufficient
};