แก้ layout ของ ตาราง

This commit is contained in:
Net 2024-07-11 15:48:37 +07:00
parent 3382e9eeca
commit b4dce64e77

View file

@ -47,7 +47,7 @@ const baseColumns = ref<QTableProps["columns"]>([
},
{
name: "createAt",
align: "left",
align: "center",
label: "วันที่สร้าง",
sortable: true,
// field: (v) => date2Thai(v, false, true),
@ -58,7 +58,7 @@ const baseColumns = ref<QTableProps["columns"]>([
},
{
name: "status",
align: "left",
align: "center",
label: "สถานะ",
sortable: true,
field: "status",
@ -168,16 +168,16 @@ onMounted(async () => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
<q-th v-for="col, i in props.cols" :key="col.name" :props="props" >
<span class="text-weight-medium" :class="{ 'q-ml-md': i === 2}" >{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td v-for="(col, i) in props.cols" :key="col.name" :props="props">
<div>
<q-td v-for="(col, i) in props.cols" :key="col.name" :props="props" >
<div :class="{ 'text-center': i === 2}">
{{ i !== 2 ? col.value : col.value === "สำเร็จ" ? "สำเร็จ" : "" }}
<q-circular-progress