format date2thai
This commit is contained in:
parent
3ad5b119bb
commit
ab095716b1
3 changed files with 14 additions and 6 deletions
|
|
@ -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"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
@ -256,7 +259,7 @@ onMounted(async () => {
|
|||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
|
||||
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
@click="openModalOrder"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue