This commit is contained in:
2023-10-20 21:54:20 +08:00
parent e5c9623092
commit c37086cfcd
5 changed files with 49 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ export default class IndexedDB {
}
request.onupgradeneeded = (event) => {
const db = event.target.result
if (!db.objectStoreNames.contains('todo')) {
if (!db.objectStoreNames.contains(name)) {
db.createObjectStore(name, { keyPath: 'id' })
console.log('store created:', name)
}