This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-26 15:30:25 +07:00
parent 9349bd216e
commit df93a526fa
18 changed files with 87 additions and 63 deletions

View file

@ -36,8 +36,8 @@ const columns = ref<QTableProps["columns"]>([
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: (row) => rows.value.indexOf(row) + 1,
sortable: false,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -226,7 +226,10 @@ onMounted(() => {
<template v-slot:body="props">
<q-tr :props="props">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div>
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>