WIP Поправил условия сохранения изменений
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
:autogrow="autogrow",
|
||||
:square="square",
|
||||
:standout="standout"
|
||||
:accept="accept"
|
||||
hide-bottom-space
|
||||
)
|
||||
slot.cursor-pointer
|
||||
@@ -65,6 +66,10 @@ export default {
|
||||
type: [Boolean, String],
|
||||
default: false,
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mask: String,
|
||||
width: Number,
|
||||
maxLength: Number,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user