refactor: header no Clean data
This commit is contained in:
parent
b312d88058
commit
77ce547978
1 changed files with 12 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue