|
|
|
@ -619,6 +619,11 @@ export const readWebsocketLog = () => {
|
|
|
|
|
}
|
|
|
|
|
openRequest.onsuccess = function (e) {
|
|
|
|
|
let db = e.target.result
|
|
|
|
|
// 数据库是否存在
|
|
|
|
|
if (!db.objectStoreNames.contains('LogStore')) {
|
|
|
|
|
resolve('Database does not exist.')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let transaction = db.transaction('LogStore')
|
|
|
|
|
let store = transaction.objectStore('LogStore')
|
|
|
|
|
let request = store.getAll()
|
|
|
|
@ -639,6 +644,9 @@ export const clearWebsocketLog = () => {
|
|
|
|
|
openRequest.onerror = function (e) {}
|
|
|
|
|
openRequest.onsuccess = function (e) {
|
|
|
|
|
let db = e.target.result
|
|
|
|
|
if (!db.objectStoreNames.contains('LogStore')) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let transaction = db.transaction('LogStore', 'readwrite')
|
|
|
|
|
let store = transaction.objectStore('LogStore')
|
|
|
|
|
// Clear the store
|
|
|
|
|