WIP Поправил условия сохранения изменений

This commit is contained in:
DwCay
2023-04-11 17:12:09 +03:00
parent 53490838f5
commit 9383be22df
6 changed files with 102 additions and 74 deletions

View File

@@ -7,7 +7,7 @@
circle,
type="file",
id="image-upload",
accept="image/*",
accept="image/.jpg,.jpeg,.png, .jpg",
@change="(e)=>previewImage(e)",
)
.avatar.flex.absolute.items-center.gap-x-6
@@ -48,15 +48,17 @@ export default {
this.image = e.target.result;
};
reader.readAsDataURL(picture[0]);
this.imageData = [...event.target.files];
},
confirm() {
this.value = this.image;
this.value.file = this.imageData;
this.value.photo = this.image;
this.confirmUpload();
},
},
created() {
if (this.value) {
this.image = this.value;
this.image = this.value.photo;
}
},
};