refactor: add props hiddenBtnSave

This commit is contained in:
Net 2024-08-01 11:23:36 +07:00
parent 85b3a984ac
commit e6cc94b201

View file

@ -2,6 +2,7 @@
// import AppBox from 'components/app/AppBox.vue';
import FormAddress from './02_personnel-management/FormAddress.vue';
withDefaults(
defineProps<{
title: string;
titleFormAddress?: string;
@ -25,13 +26,18 @@ defineProps<{
isEdit?: boolean;
tabsList?: { name: string; label: string }[];
hiddenBtnSave?: boolean;
editData?: (...args: unknown[]) => void;
deleteData?: (...args: unknown[]) => void;
submit?: (...args: unknown[]) => void;
close?: (...args: unknown[]) => void;
undo?: (...args: unknown[]) => void;
}>();
}>(),
{
hiddenBtnSave: true,
},
);
const modal = defineModel('modal', { default: false });
const address = defineModel('address', { default: '' });
@ -139,7 +145,7 @@ const currentTab = defineModel<string>('currentTab');
padding="xs"
class="close-btn"
:class="{ dark: $q.dark.isActive }"
@click="close"
@click.stop="close"
/>
</div>
</div>
@ -275,6 +281,7 @@ const currentTab = defineModel<string>('currentTab');
v-close-popup
/>
<q-btn
v-if="hiddenBtnSave"
dense
unelevated
id="submitBtn"