mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-18 11:47:28 +08:00
feat: data export and import
This commit is contained in:
@@ -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('存储类型不支持清空数据操作');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 导出默认实例
|
||||
|
||||
Reference in New Issue
Block a user