refactor: add definProps hideCloseEvent

This commit is contained in:
Net 2024-09-19 09:51:47 +07:00
parent 8122b578e5
commit eca341ed5a

View file

@ -22,10 +22,9 @@ defineProps<{
saveAmount?: number;
submitLabel?: string;
isEdit?: boolean;
tabsList?: { name: string; label: string }[];
hideCloseEvent?: boolean;
editData?: (...args: unknown[]) => void;
deleteData?: (...args: unknown[]) => void;
show?: (...args: unknown[]) => void;
@ -43,7 +42,7 @@ const currentTab = defineModel<string>('currentTab');
:model-value="modal"
@update:model-value="(v) => (modal = beforeClose ? beforeClose() : v)"
@before-show="show"
@hide="close"
@hide="hideCloseEvent !== undefined && hideCloseEvent ? '' : close"
>
<div
class="surface-1"