1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 02:28:54 +08:00
This commit is contained in:
lana-k
2021-04-27 22:51:36 +02:00
parent 35baaf2722
commit 9ed53e0d25
13 changed files with 105 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="db-uploader-container">
<div class="db-uploader-container" :style="{ width }">
<change-db-icon v-if="type === 'small'" @click.native="browse"/>
<div v-if="['regular', 'illustrated'].includes(type)" class="drop-area-container">
<div
@@ -158,6 +158,11 @@ export default {
validator: (value) => {
return ['regular', 'illustrated', 'small'].includes(value)
}
},
width: {
type: String,
required: false,
default: 'unset'
}
},
components: {
@@ -333,8 +338,9 @@ export default {
}, 1000)
// Create db with csv table and get schema
const name = file.name.replace(/\.[^.]+$/, '')
start = new Date()
this.schema = await this.newDb.createDb(file.name, parseResult.data, progressCounterId)
this.schema = await this.newDb.createDb(name, parseResult.data, progressCounterId)
end = new Date()
// Inform about import success