From c021cd162b2448b14285f816a8c13d15d39751ac Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 27 May 2025 09:54:24 +0800 Subject: [PATCH] # --- src/utils/commons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)