From 01a2627af335c886a516117c6e8d4d83b8e1828d Mon Sep 17 00:00:00 2001 From: nelyaklyusa Date: Wed, 29 May 2024 20:06:55 +0300 Subject: [PATCH] update uploader --- src/components/BaseUploader/BaseUploader.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/BaseUploader/BaseUploader.vue b/src/components/BaseUploader/BaseUploader.vue index 9cc10b8..46d282d 100644 --- a/src/components/BaseUploader/BaseUploader.vue +++ b/src/components/BaseUploader/BaseUploader.vue @@ -73,6 +73,7 @@ const drop = (e: DragEvent) => { const removeFile = (index: number) => { allFiles.value.splice(index, 1); filesUploadError.value = ''; + emit('update:files', allFiles.value); emit('remove', index); }; @@ -90,6 +91,7 @@ const removeFile = (index: number) => { @dragover.prevent="dragover" @dragleave.prevent="dragleave" @drop.prevent="drop" + @click="triggerFileInput" > {
×
@@ -193,6 +195,10 @@ const removeFile = (index: number) => { &.is--disabled opacity: 0.3 + &:hover + border-color: $primary + cursor: pointer + input[type="file"] opacity: 0 overflow: hidden @@ -209,6 +215,8 @@ const removeFile = (index: number) => { &__preview width: 100% + position: relative + z-index: 1 &__preview-card width: 100%