1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

add hidden state for file in animation

This commit is contained in:
lana-k
2021-05-06 15:17:15 +02:00
parent 653f8eff7b
commit 7574f529c3

View File

@@ -26,7 +26,8 @@
ref="fileImg"
:class="{
'swing': state === 'dragover',
'fly': state === 'drop'
'fly': state === 'dropping',
'hidden': state === 'dropped'
}"
:src="require('@/assets/images/file.png')"
/>
@@ -196,6 +197,7 @@ export default {
this.animationPromise = new Promise((resolve) => {
this.$refs.fileImg.addEventListener('animationend', event => {
if (event.animationName.startsWith('fly')) {
this.state = 'dropped'
resolve()
}
})
@@ -387,7 +389,7 @@ export default {
},
async checkFile (file) {
this.state = 'drop'
this.state = 'dropping'
if (csvMimeTypes.includes(file.type)) {
this.file = file
this.header = true
@@ -519,6 +521,11 @@ export default {
left: 225px;
}
}
#file-img.hidden {
display: none;
}
/* Parse CSV dialog */
.chars {
display: flex;