fix แก้เงื่อนไขการแสดงปุ่มแก้ไข

This commit is contained in:
Net 2024-06-24 09:44:00 +07:00
parent 848f35e47e
commit 1be8bba799

View file

@ -2,7 +2,8 @@
import { ref } from 'vue';
import AppBox from './app/AppBox.vue';
defineProps<{
withDefaults(
defineProps<{
title: string;
category?: string;
isEdit?: boolean;
@ -11,12 +12,17 @@ defineProps<{
badgeLabel?: string;
badgeClass?: string;
bgColor?: string;
showEdit?: boolean;
editData?: (...args: unknown[]) => void;
deleteData?: (...args: unknown[]) => void;
submit?: (...args: unknown[]) => void;
close?: (...args: unknown[]) => void;
undo?: (...args: unknown[]) => void;
}>();
}>(),
{
showEdit: true,
},
);
const drawerOpen = defineModel<boolean>('drawerOpen', {
default: false,
@ -62,6 +68,7 @@ function reset() {
style="padding: 0; border-radius: var(--radius-2)"
>
<div class="form-header col q-px-lg row items-center">
<div v-if="showEdit">
<div v-if="isEdit" class="row">
<q-btn
round
@ -99,6 +106,7 @@ function reset() {
@click="deleteData"
/>
</div>
</div>
<div class="col text-weight-bold text-center">
<text