fix: 修复 transaction 表名与 Dexie 内置方法冲突(导出 JSON 与记账失效)

This commit is contained in:
root
2026-10-16 13:19:54 +08:00
parent f0d30e2c29
commit 5a67b2f59a
10 changed files with 57 additions and 42 deletions
+7 -3
View File
@@ -219,9 +219,13 @@ async function toggleArchive(p: Project) {
}
async function doExport() {
const text = await exportAll()
const p = await downloadText('实习日志备份_' + todayStr().replace(/-/g, '') + '.json', text)
showToast(p ? '备份已导出到:' + p : '备份已导出到系统下载目录')
try {
const text = await exportAll()
const p = await downloadText('实习日志备份_' + todayStr().replace(/-/g, '') + '.json', text)
showToast(p ? '备份已导出到:' + p : '备份已导出到系统下载目录')
} catch (e) {
showToast('导出失败:' + (e instanceof Error ? e.message : String(e)))
}
}
function onFile(e: Event) {