refactor:handle mode info or edit

This commit is contained in:
Thanaphon Frappet 2024-10-10 13:31:46 +07:00
parent 659f78211e
commit a066b2c843
4 changed files with 46 additions and 10 deletions

View file

@ -5,6 +5,7 @@ import DeleteButton from './button/DeleteButton.vue';
const props = withDefaults(
defineProps<{
readonly?: boolean;
rows: QTableProps['rows'];
columns: QTableProps['columns'];
flat?: boolean;
@ -91,7 +92,10 @@ defineEmits<{
<template v-slot:body-cell-action="props">
<q-td>
<div class="row items-center full-width justify-end no-wrap">
<div
class="row items-center full-width justify-end no-wrap"
v-if="!readonly"
>
<slot name="button" :props="props"></slot>
<DeleteButton
iconOnly