refactor: handle btn on dialog
This commit is contained in:
parent
29a0269453
commit
1792f60055
2 changed files with 43 additions and 38 deletions
|
|
@ -21,6 +21,7 @@ defineProps<{
|
||||||
edit?: boolean;
|
edit?: boolean;
|
||||||
hideFooter?: boolean;
|
hideFooter?: boolean;
|
||||||
hideDelete?: boolean;
|
hideDelete?: boolean;
|
||||||
|
hideBtn?: boolean;
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
|
|
||||||
saveAmount?: number;
|
saveAmount?: number;
|
||||||
|
|
@ -68,6 +69,7 @@ const currentTab = defineModel<string>('currentTab');
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
|
<templatez v-if="!hideBtn">
|
||||||
<div v-if="!readonly && isEdit && edit" class="row">
|
<div v-if="!readonly && isEdit && edit" class="row">
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
round
|
||||||
|
|
@ -106,6 +108,7 @@ const currentTab = defineModel<string>('currentTab');
|
||||||
@click="deleteData"
|
@click="deleteData"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</templatez>
|
||||||
|
|
||||||
<div style="width: 31.98px"></div>
|
<div style="width: 31.98px"></div>
|
||||||
<div class="col text-subtitle1 text-weight-bold text-center">
|
<div class="col text-subtitle1 text-weight-bold text-center">
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ type Props = {
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
autoSave?: boolean;
|
autoSave?: boolean;
|
||||||
data?: Data;
|
data?: Data;
|
||||||
|
hideBtn?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
type HandleProps = {
|
type HandleProps = {
|
||||||
|
|
@ -106,6 +107,7 @@ async function change(e: Event) {
|
||||||
weight="90%"
|
weight="90%"
|
||||||
hide-close-event
|
hide-close-event
|
||||||
hide-delete
|
hide-delete
|
||||||
|
hide-btn
|
||||||
edit
|
edit
|
||||||
:title
|
:title
|
||||||
:is-edit
|
:is-edit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue