fix: src/components/EditPictureForm.vue
This commit is contained in:
parent
d5dc9d974c
commit
d8bf95008a
|
@ -24,8 +24,7 @@ export default {
|
||||||
firstInputElement.focus();
|
firstInputElement.focus();
|
||||||
}
|
}
|
||||||
const that = this;
|
const that = this;
|
||||||
for (const availableInput of availableInputs) {
|
this.$el.addEventListener('keyup', function (evt) {
|
||||||
availableInput.addEventListener('keydown', (evt) => {
|
|
||||||
if (evt.key === 'Enter') {
|
if (evt.key === 'Enter') {
|
||||||
const input = evt.target;
|
const input = evt.target;
|
||||||
console.log('input', input);
|
console.log('input', input);
|
||||||
|
@ -45,6 +44,5 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -155,7 +155,7 @@ const rotateRight = () => {
|
||||||
editor.value.rotate(-90);
|
editor.value.rotate(-90);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onUploadAccept = () => {
|
const onSubmit = () => {
|
||||||
try {
|
try {
|
||||||
if (!newPhoto.files && !newPhoto.url) {
|
if (!newPhoto.files && !newPhoto.url) {
|
||||||
notify(t('Select an image'), 'negative');
|
notify(t('Select an image'), 'negative');
|
||||||
|
@ -206,11 +206,7 @@ const makeRequest = async () => {
|
||||||
@on-fetch="(data) => (allowedContentTypes = data.join(', '))"
|
@on-fetch="(data) => (allowedContentTypes = data.join(', '))"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<QForm
|
<QForm @submit="onSubmit()" class="all-pointer-events">
|
||||||
@submit="onUploadAccept()"
|
|
||||||
@keyup.enter="onUploadAccept()"
|
|
||||||
class="all-pointer-events"
|
|
||||||
>
|
|
||||||
<QCard class="q-pa-lg">
|
<QCard class="q-pa-lg">
|
||||||
<span ref="closeButton" class="close-icon" v-close-popup>
|
<span ref="closeButton" class="close-icon" v-close-popup>
|
||||||
<QIcon name="close" size="sm" />
|
<QIcon name="close" size="sm" />
|
||||||
|
|
Loading…
Reference in New Issue