diff --git a/biji-qianduan/src/components/HomePage.vue b/biji-qianduan/src/components/HomePage.vue index 6363922..e0fd4af 100644 --- a/biji-qianduan/src/components/HomePage.vue +++ b/biji-qianduan/src/components/HomePage.vue @@ -626,11 +626,11 @@ const handleSave = async (content) => { // 使用后端返回的完整、最新的数据更新前端状态 // 这对于新创建的笔记至关重要,因为它会获得一个新的 ID - editData.value = response.data; + editData.value = response; // 如果当前正在预览这个文件,也更新 selectedFile - if (selectedFile.value && (!selectedFile.value.id || selectedFile.value.id === response.data.id)) { - selectedFile.value = response.data; + if (selectedFile.value && (!selectedFile.value.id || selectedFile.value.id === response.id)) { + selectedFile.value = response; } saveStatus.value = '已保存'; diff --git a/mydatabase.db b/mydatabase.db index 914edc9..886b03e 100644 Binary files a/mydatabase.db and b/mydatabase.db differ