refactor: header no Clean data

This commit is contained in:
Net 2024-09-05 15:01:35 +07:00
parent b312d88058
commit 77ce547978

View file

@ -25,6 +25,7 @@ withDefaults(
close?: (...args: unknown[]) => void;
undo?: (...args: unknown[]) => void;
beforeClose?: (...args: unknown[]) => boolean;
show?: (...args: unknown[]) => void;
}>(),
{
hideAction: false,
@ -48,6 +49,7 @@ function reset() {
<template>
<q-drawer
no-swipe-open
@show="show"
@before-hide="reset"
@hide="close"
@update:model-value="(v) => (drawerOpen = beforeClose ? beforeClose() : v)"
@ -143,7 +145,16 @@ function reset() {
<!-- footer -->
<div class="bordered-t q-pr-lg row items-center justify-end q-py-md">
<CancelButton id="btn-info-cancel" outlined @click="close" />
<CancelButton
id="btn-info-cancel"
outlined
@click="
() => {
drawerOpen = beforeClose ? beforeClose() : !drawerOpen;
close?.();
}
"
/>
<SaveButton
class="q-ml-md"
id="btn-info-save"