🐛 Fixed hotkey service issues

This commit is contained in:
2025-08-19 00:08:50 +08:00
parent 873a3c0e60
commit 7b70a39b23
12 changed files with 348 additions and 51 deletions

View File

@@ -160,10 +160,12 @@ export const useDocumentStore = defineStore('document', () => {
try {
// 检查是否是默认文档使用ID判断
if (docId === SCRATCH_DOCUMENT_ID) {
console.log('Cannot delete default document (ID=1)');
return false;
}
await DocumentService.DeleteDocument(docId);
console.log('Backend delete successful for doc:', docId);
// 更新本地状态
delete documents.value[docId];