fix: hide ImageUploadDialog footer
This commit is contained in:
parent
693c2fcb9a
commit
30787ff473
2 changed files with 13 additions and 5 deletions
|
|
@ -359,6 +359,7 @@ function clearData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function undo() {
|
async function undo() {
|
||||||
|
isImageEdit.value = false;
|
||||||
formType.value = 'view';
|
formType.value = 'view';
|
||||||
imageUrl.value = prevImageUrl.value;
|
imageUrl.value = prevImageUrl.value;
|
||||||
formData.value = prevFormData.value;
|
formData.value = prevFormData.value;
|
||||||
|
|
@ -390,6 +391,7 @@ function triggerCreate(
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawerEdit() {
|
function drawerEdit() {
|
||||||
|
isImageEdit.value = true;
|
||||||
formType.value = 'edit';
|
formType.value = 'edit';
|
||||||
prevFormData.value = {
|
prevFormData.value = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
|
|
|
||||||
|
|
@ -378,6 +378,7 @@ async function openDialog(
|
||||||
|
|
||||||
function undo() {
|
function undo() {
|
||||||
if (!infoPersonId.value) return;
|
if (!infoPersonId.value) return;
|
||||||
|
isImageEdit.value = false;
|
||||||
infoDrawerEdit.value = false;
|
infoDrawerEdit.value = false;
|
||||||
assignFormData(infoPersonId.value);
|
assignFormData(infoPersonId.value);
|
||||||
}
|
}
|
||||||
|
|
@ -396,6 +397,7 @@ function onClose() {
|
||||||
infoDrawer.value = false;
|
infoDrawer.value = false;
|
||||||
profileSubmit.value = false;
|
profileSubmit.value = false;
|
||||||
statusToggle.value = true;
|
statusToggle.value = true;
|
||||||
|
isImageEdit.value = false;
|
||||||
Object.assign(formData.value, defaultFormData);
|
Object.assign(formData.value, defaultFormData);
|
||||||
mapUserType(selectorLabel.value);
|
mapUserType(selectorLabel.value);
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
|
|
@ -624,9 +626,7 @@ async function assignFormData(idEdit: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openImageDialog(isEdit?: boolean) {
|
function openImageDialog() {
|
||||||
if (isEdit) isImageEdit.value = true;
|
|
||||||
else isImageEdit.value = false;
|
|
||||||
imageDialog.value = true;
|
imageDialog.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1532,7 +1532,11 @@ watch(
|
||||||
:submit="() => onSubmit()"
|
:submit="() => onSubmit()"
|
||||||
:close="() => onClose()"
|
:close="() => onClose()"
|
||||||
:undo="() => undo()"
|
:undo="() => undo()"
|
||||||
:editData="() => (infoDrawerEdit = true)"
|
:editData="
|
||||||
|
() => {
|
||||||
|
(infoDrawerEdit = true), (isImageEdit = true);
|
||||||
|
}
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<InfoForm
|
<InfoForm
|
||||||
:readonly="!infoDrawerEdit"
|
:readonly="!infoDrawerEdit"
|
||||||
|
|
@ -1846,8 +1850,10 @@ watch(
|
||||||
}`"
|
}`"
|
||||||
>
|
>
|
||||||
<q-img
|
<q-img
|
||||||
v-if="!modal"
|
v-if="infoDrawer"
|
||||||
|
fit="contain"
|
||||||
:src="`/no-img-${formData.gender === 'male' ? 'man' : 'female'}.png`"
|
:src="`/no-img-${formData.gender === 'male' ? 'man' : 'female'}.png`"
|
||||||
|
style="height: 100%"
|
||||||
/>
|
/>
|
||||||
<q-icon
|
<q-icon
|
||||||
v-else
|
v-else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue