feat(imgConfig): 优化图片存储结构

新增uuid依赖用于生成唯一ID,改进图片上传功能中的本地存储结构,
使用uuid替代时间戳作为键名以避免冲突,并调整从indexedDB读取数据的方式。
This commit is contained in:
log1997
2025-12-04 13:47:28 +08:00
parent f062f7c9e6
commit cdd4972870
7 changed files with 309 additions and 284 deletions

View File

@@ -0,0 +1,13 @@
import localforage from 'localforage'
const imageDbStore = localforage.createInstance({
name: 'imgStore',
})
async function clearImageDbStore() {
await imageDbStore.clear()
}
export function clearAllDbStore() {
clearImageDbStore()
}