refactor: handle btn on dialog

This commit is contained in:
Thanaphon Frappet 2024-12-24 13:19:18 +07:00
parent 29a0269453
commit 1792f60055
2 changed files with 43 additions and 38 deletions

View file

@ -21,6 +21,7 @@ defineProps<{
edit?: boolean;
hideFooter?: boolean;
hideDelete?: boolean;
hideBtn?: boolean;
readonly?: boolean;
saveAmount?: number;
@ -68,6 +69,7 @@ const currentTab = defineModel<string>('currentTab');
}"
>
<div class="row items-center">
<templatez v-if="!hideBtn">
<div v-if="!readonly && isEdit && edit" class="row">
<q-btn
round
@ -106,6 +108,7 @@ const currentTab = defineModel<string>('currentTab');
@click="deleteData"
/>
</div>
</templatez>
<div style="width: 31.98px"></div>
<div class="col text-subtitle1 text-weight-bold text-center">

View file

@ -21,6 +21,7 @@ type Props = {
readonly?: boolean;
autoSave?: boolean;
data?: Data;
hideBtn?: boolean;
};
type HandleProps = {
@ -106,6 +107,7 @@ async function change(e: Event) {
weight="90%"
hide-close-event
hide-delete
hide-btn
edit
:title
:is-edit