format date2thai

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-14 17:08:13 +07:00
parent 3ad5b119bb
commit ab095716b1
3 changed files with 14 additions and 6 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, watchEffect,computed } from "vue";
import { ref, watchEffect, computed } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -116,7 +116,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "วันที่ยื่น",
sortable: true,
field: (row) => date2Thai(new Date(row.createdAt)),
field: "createdAt",
format(val, row) {
return date2Thai(new Date(val));
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sortOrder: "da",
@ -214,7 +217,6 @@ watchEffect(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
class="gt-xs q-ml-sm"
/>

View file

@ -116,7 +116,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "วันที่ยื่น",
sortable: true,
field: (row) => date2Thai(new Date(row.createdAt)),
field: "createdAt",
format(val, row) {
return date2Thai(new Date(val));
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sortOrder: "da",

View file

@ -99,7 +99,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "วันที่ยื่น",
sortable: true,
field: (row) => date2Thai(new Date(row.createdAt)),
field: "createdAt",
format(val, row) {
return date2Thai(new Date(val));
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sortOrder: "da",