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