feat: data export and import

This commit is contained in:
shinya
2025-08-15 13:49:08 +08:00
parent f52048ec2e
commit 58be9b01aa
18 changed files with 936 additions and 167 deletions

View File

@@ -218,6 +218,15 @@ export class DbManager {
}
return {};
}
// ---------- 数据清理 ----------
async clearAllData(): Promise<void> {
if (typeof (this.storage as any).clearAllData === 'function') {
await (this.storage as any).clearAllData();
} else {
throw new Error('存储类型不支持清空数据操作');
}
}
}
// 导出默认实例