1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-10 03:58:54 +08:00

#63 migrate to Vue 3

This commit is contained in:
lana-k
2024-10-13 16:12:21 +02:00
parent b30b2181e4
commit 637d8d26dd
60 changed files with 16279 additions and 17440 deletions

8
src/lib/eventBus.js Normal file
View File

@@ -0,0 +1,8 @@
import emitter from 'tiny-emitter/instance'
export default {
$on: (...args) => emitter.on(...args),
$once: (...args) => emitter.once(...args),
$off: (...args) => emitter.off(...args),
$emit: (...args) => emitter.emit(...args)
}

View File

@@ -48,11 +48,13 @@ export default {
// Get inquiries from local storage
const myInquiries = this.getStoredInquiries()
let inquiryIndex
// Set createdAt
if (newName) {
value.createdAt = new Date()
} else {
var inquiryIndex = myInquiries.findIndex(oldInquiry => oldInquiry.id === inquiryTab.id)
inquiryIndex = myInquiries
.findIndex(oldInquiry => oldInquiry.id === inquiryTab.id)
value.createdAt = myInquiries[inquiryIndex].createdAt
}