diff --git a/src/utils/commons.js b/src/utils/commons.js index 202e6bb..1032e2f 100644 --- a/src/utils/commons.js +++ b/src/utils/commons.js @@ -700,7 +700,7 @@ export const writeIndexDB = (row, table, database) => { var db = open.result // 数据库是否存在 if (!db.objectStoreNames.contains(table)) { - var store = db.createObjectStore(table, { keyPath: 'id', autoIncrement: true }) + var store = db.createObjectStore(table, { keyPath: 'key' }) store.createIndex('timestamp', 'timestamp', { unique: false }) } else { const objectStore = open.transaction.objectStore(table)