mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 10:38:54 +08:00
add tests for database module #27
This commit is contained in:
@@ -283,8 +283,8 @@ export default {
|
||||
}
|
||||
let importLoadingIndicator = null
|
||||
|
||||
const updateProgress = e => {
|
||||
this.$set(importMsg, 'progress', e.detail)
|
||||
const updateProgress = progress => {
|
||||
this.$set(importMsg, 'progress', progress)
|
||||
}
|
||||
this.newDb = database.getNewDatabase()
|
||||
const progressCounterId = this.newDb.createProgressCounter(updateProgress)
|
||||
|
||||
@@ -42,7 +42,7 @@ class Database {
|
||||
createProgressCounter (callback) {
|
||||
const id = progressCounterIds++
|
||||
this.importProgresses[id] = new EventTarget()
|
||||
this.importProgresses[id].addEventListener('progress', callback)
|
||||
this.importProgresses[id].addEventListener('progress', e => { callback(e.detail) })
|
||||
return id
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user