fix(biji): 优化笔记编辑器自动保存机制并修复相关问题

- 实现了更可靠的自动保存功能,仅在用户停止输入后触发保存操作
- 修复了切换笔记时意外触发自动保存的问题
- 优化了重命名文件后的预览更新逻辑
- 调整了保存成功后的状态清理策略,提高了用户体验
This commit is contained in:
2025-08-14 14:44:27 +08:00
parent 337645f27b
commit 56465ffa75
12 changed files with 198 additions and 82 deletions

View File

@@ -3,4 +3,20 @@
This file tracks the overall progress of the project. Major milestones and completed tasks will be logged here.
## Initial Setup
- [x] Created the basic Memory Bank structure.
- [x] Created the basic Memory Bank structure.
## Bug Fixes (2025-08-14)
### Bug #1: 保存后自动返回首页
**根本原因**
父组件`HomePage.vue`监听了子组件未使用的`save-success`事件(历史遗留问题)
**修复方案**
修改`biji-qianduan/src/components/HomePage.vue`第27行
```diff
- @save-success="handleSaveSuccess"
+ @update:edit-data="handleSaveSuccess"
```
**验证结果**
✅ 修复后保存操作正常返回预览页,保持编辑状态