feat: add option to disabled change button top left

This commit is contained in:
Methapon2001 2024-08-15 15:08:38 +07:00
parent 71ba418493
commit 3f4a3dde90
3 changed files with 6 additions and 2 deletions

View file

@ -3,6 +3,7 @@ import AppBox from './app/AppBox.vue';
defineExpose({ browse });
defineProps<{
changeDisabled?: boolean;
clearButtonDisabled?: boolean;
clearButton?: boolean;
hiddenFooter?: boolean;
@ -93,6 +94,7 @@ function change(e: Event) {
size="md"
unelevated
round
v-if="!changeDisabled"
@click="inputFile?.click()"
></q-btn>
</div>

View file

@ -2087,8 +2087,9 @@ watch(currentHq, () => {
v-model:file="profileFileImg as File"
v-model:image-url="imageUrl"
:hiddenFooter="!isImageEdit"
:changeDisabled="!isImageEdit"
@save="imageDialog = false"
clearButton
@save="handleImageUpload"
>
<template #error>
<div class="full-height full-width" style="background: white">

View file

@ -1890,8 +1890,9 @@ watch(
v-model:image-url="urlProfile"
:default-url="`${baseUrl}/user/${currentUser?.id}/image`"
:hiddenFooter="!isImageEdit"
:changeDisabled="!isImageEdit"
@save="imageDialog = false"
clearButton
@save="handleImageUpload"
>
<template #error>
<div class="full-height full-width" style="background: white">