@finema/core 1.4.201 → 1.4.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +60 -60
  2. package/dist/module.d.mts +1 -0
  3. package/dist/module.d.ts +1 -0
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +2 -1
  6. package/dist/runtime/components/Alert.vue +48 -48
  7. package/dist/runtime/components/Avatar.vue +27 -27
  8. package/dist/runtime/components/Badge.vue +11 -11
  9. package/dist/runtime/components/Breadcrumb.vue +44 -44
  10. package/dist/runtime/components/Button/Group.vue +37 -37
  11. package/dist/runtime/components/Button/index.vue +75 -75
  12. package/dist/runtime/components/Card.vue +38 -38
  13. package/dist/runtime/components/Core.vue +45 -45
  14. package/dist/runtime/components/Dialog/index.vue +108 -108
  15. package/dist/runtime/components/Dropdown/index.vue +70 -70
  16. package/dist/runtime/components/FlexDeck/Base.vue +152 -152
  17. package/dist/runtime/components/FlexDeck/index.vue +68 -68
  18. package/dist/runtime/components/Form/FieldWrapper.vue +23 -23
  19. package/dist/runtime/components/Form/Fields.vue +230 -230
  20. package/dist/runtime/components/Form/InputCheckbox/index.vue +28 -28
  21. package/dist/runtime/components/Form/InputDateTime/index.vue +61 -61
  22. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +83 -83
  23. package/dist/runtime/components/Form/InputNumber/index.vue +27 -27
  24. package/dist/runtime/components/Form/InputRadio/index.vue +27 -27
  25. package/dist/runtime/components/Form/InputSelect/index.vue +45 -45
  26. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +54 -54
  27. package/dist/runtime/components/Form/InputStatic/index.vue +16 -16
  28. package/dist/runtime/components/Form/InputTags/index.vue +141 -141
  29. package/dist/runtime/components/Form/InputText/index.vue +68 -68
  30. package/dist/runtime/components/Form/InputTextarea/index.vue +25 -25
  31. package/dist/runtime/components/Form/InputToggle/index.vue +27 -27
  32. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +206 -206
  33. package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +342 -342
  34. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemUpload.vue +241 -241
  35. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemView.vue +89 -89
  36. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +170 -170
  37. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemUpload.vue +161 -161
  38. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemView.vue +64 -64
  39. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/index.vue +178 -178
  40. package/dist/runtime/components/Form/InputUploadFileClassic/index.vue +95 -95
  41. package/dist/runtime/components/Form/InputUploadFileClassicAuto/index.vue +151 -151
  42. package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +219 -219
  43. package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +55 -55
  44. package/dist/runtime/components/Form/InputWYSIWYG/index.vue +228 -228
  45. package/dist/runtime/components/Form/index.vue +6 -6
  46. package/dist/runtime/components/Icon.vue +23 -23
  47. package/dist/runtime/components/Image.vue +36 -36
  48. package/dist/runtime/components/Loader.vue +27 -27
  49. package/dist/runtime/components/Modal/index.vue +146 -146
  50. package/dist/runtime/components/QRCode.vue +22 -22
  51. package/dist/runtime/components/SimplePagination.vue +96 -96
  52. package/dist/runtime/components/Slideover/index.vue +110 -110
  53. package/dist/runtime/components/Table/Base.vue +153 -153
  54. package/dist/runtime/components/Table/ColumnDate.vue +16 -16
  55. package/dist/runtime/components/Table/ColumnDateTime.vue +18 -18
  56. package/dist/runtime/components/Table/ColumnImage.vue +15 -15
  57. package/dist/runtime/components/Table/ColumnNumber.vue +14 -14
  58. package/dist/runtime/components/Table/ColumnText.vue +29 -29
  59. package/dist/runtime/components/Table/Simple.vue +69 -69
  60. package/dist/runtime/components/Table/index.vue +65 -65
  61. package/dist/runtime/components/Tabs/index.vue +64 -64
  62. package/dist/runtime/components/TeleportSafe.vue +40 -40
  63. package/dist/runtime/core.config.d.ts +1 -0
  64. package/dist/runtime/core.config.mjs +2 -1
  65. package/dist/runtime/ui.config/notifications.d.ts +3 -0
  66. package/dist/runtime/ui.config/notifications.mjs +3 -0
  67. package/dist/runtime/utils/TimeHelper.mjs +15 -10
  68. package/dist/runtime/utils/TimeHelper.spec.mjs +11 -4
  69. package/dist/runtime/utils/TimeHelper.thai.spec.mjs +2 -1
  70. package/package.json +102 -101
  71. package/dist/runtime/components/Form/InputDateTime/index.vue~ +0 -61
  72. package/dist/runtime/ui.config/table.ts~ +0 -48
@@ -1,110 +1,110 @@
1
- <template>
2
- <USlideover
3
- v-bind="attrs"
4
- :model-value="modelValue"
5
- :class="$props.class"
6
- :prevent-close="preventClose"
7
- :overlay="overlay"
8
- :transition="transition"
9
- :side="side"
10
- :initial-focus="emptyFocusRef"
11
- :ui="ui"
12
- @update:model-value="$emit('update:modelValue', $event)"
13
- >
14
- <div v-if="!isHideCloseBtn && preventClose" class="absolute right-0 m-4">
15
- <Icon
16
- v-if="!isHideCloseBtn"
17
- name="i-heroicons-x-mark"
18
- class="size-6 cursor-pointer"
19
- @click="close"
20
- />
21
- </div>
22
-
23
- <div :class="['overflow-y-auto', ui.bodyWrapper]">
24
- <slot />
25
- </div>
26
- </USlideover>
27
-
28
- <div ref="emptyFocusRef" />
29
- </template>
30
-
31
- <script lang="ts" setup>
32
- import { ref, type PropType, toRef, defineShortcuts, watch } from '#imports'
33
- import { useUI } from '#ui/composables/useUI'
34
- import { slideover } from '#core/ui.config'
35
- import { useUiConfig } from '#core/composables/useConfig'
36
- import type { Strategy } from '#ui/types'
37
-
38
- const config = useUiConfig<typeof slideover>(slideover, 'slideover')
39
-
40
- const props = defineProps({
41
- modelValue: {
42
- type: Boolean as PropType<boolean>,
43
- default: false,
44
- },
45
- side: {
46
- type: String as PropType<'left' | 'right'>,
47
- default: 'right',
48
- validator: (value: string) => ['left', 'right'].includes(value),
49
- },
50
- overlay: {
51
- type: Boolean,
52
- default: true,
53
- },
54
- preventClose: {
55
- type: Boolean,
56
- default: false,
57
- },
58
- isHideCloseBtn: {
59
- type: Boolean,
60
- default: false,
61
- },
62
- transition: {
63
- type: Boolean,
64
- default: true,
65
- },
66
- size: {
67
- type: String as PropType<keyof typeof slideover.size>,
68
- default: () => slideover.default.size,
69
- },
70
- class: {
71
- type: [String, Array, Object] as PropType<any>,
72
- default: undefined,
73
- },
74
- ui: {
75
- type: Object as PropType<Partial<typeof config & { strategy?: Strategy }>>,
76
- default: undefined,
77
- },
78
- })
79
-
80
- const emits = defineEmits(['update:modelValue'])
81
-
82
- const emptyFocusRef = ref<HTMLElement | null>(null)
83
-
84
- defineShortcuts({
85
- escape: {
86
- usingInput: true,
87
- handler: () => {
88
- if (props.preventClose) return
89
- emits('update:modelValue', false)
90
- },
91
- },
92
- })
93
-
94
- const close = () => {
95
- emits('update:modelValue', false)
96
- }
97
-
98
- const { ui, attrs } = useUI('slideover', toRef(props, 'ui'), config, toRef(props, 'class'))
99
-
100
- watch(
101
- () => props.modelValue,
102
- () => {
103
- if (props.modelValue) {
104
- const size = config.size[props.size]
105
-
106
- ui.value.width = size
107
- }
108
- }
109
- )
110
- </script>
1
+ <template>
2
+ <USlideover
3
+ v-bind="attrs"
4
+ :model-value="modelValue"
5
+ :class="$props.class"
6
+ :prevent-close="preventClose"
7
+ :overlay="overlay"
8
+ :transition="transition"
9
+ :side="side"
10
+ :initial-focus="emptyFocusRef"
11
+ :ui="ui"
12
+ @update:model-value="$emit('update:modelValue', $event)"
13
+ >
14
+ <div v-if="!isHideCloseBtn && preventClose" class="absolute right-0 m-4">
15
+ <Icon
16
+ v-if="!isHideCloseBtn"
17
+ name="i-heroicons-x-mark"
18
+ class="size-6 cursor-pointer"
19
+ @click="close"
20
+ />
21
+ </div>
22
+
23
+ <div :class="['overflow-y-auto', ui.bodyWrapper]">
24
+ <slot />
25
+ </div>
26
+ </USlideover>
27
+
28
+ <div ref="emptyFocusRef" />
29
+ </template>
30
+
31
+ <script lang="ts" setup>
32
+ import { ref, type PropType, toRef, defineShortcuts, watch } from '#imports'
33
+ import { useUI } from '#ui/composables/useUI'
34
+ import { slideover } from '#core/ui.config'
35
+ import { useUiConfig } from '#core/composables/useConfig'
36
+ import type { Strategy } from '#ui/types'
37
+
38
+ const config = useUiConfig<typeof slideover>(slideover, 'slideover')
39
+
40
+ const props = defineProps({
41
+ modelValue: {
42
+ type: Boolean as PropType<boolean>,
43
+ default: false,
44
+ },
45
+ side: {
46
+ type: String as PropType<'left' | 'right'>,
47
+ default: 'right',
48
+ validator: (value: string) => ['left', 'right'].includes(value),
49
+ },
50
+ overlay: {
51
+ type: Boolean,
52
+ default: true,
53
+ },
54
+ preventClose: {
55
+ type: Boolean,
56
+ default: false,
57
+ },
58
+ isHideCloseBtn: {
59
+ type: Boolean,
60
+ default: false,
61
+ },
62
+ transition: {
63
+ type: Boolean,
64
+ default: true,
65
+ },
66
+ size: {
67
+ type: String as PropType<keyof typeof slideover.size>,
68
+ default: () => slideover.default.size,
69
+ },
70
+ class: {
71
+ type: [String, Array, Object] as PropType<any>,
72
+ default: undefined,
73
+ },
74
+ ui: {
75
+ type: Object as PropType<Partial<typeof config & { strategy?: Strategy }>>,
76
+ default: undefined,
77
+ },
78
+ })
79
+
80
+ const emits = defineEmits(['update:modelValue'])
81
+
82
+ const emptyFocusRef = ref<HTMLElement | null>(null)
83
+
84
+ defineShortcuts({
85
+ escape: {
86
+ usingInput: true,
87
+ handler: () => {
88
+ if (props.preventClose) return
89
+ emits('update:modelValue', false)
90
+ },
91
+ },
92
+ })
93
+
94
+ const close = () => {
95
+ emits('update:modelValue', false)
96
+ }
97
+
98
+ const { ui, attrs } = useUI('slideover', toRef(props, 'ui'), config, toRef(props, 'class'))
99
+
100
+ watch(
101
+ () => props.modelValue,
102
+ () => {
103
+ if (props.modelValue) {
104
+ const size = config.size[props.size]
105
+
106
+ ui.value.width = size
107
+ }
108
+ }
109
+ )
110
+ </script>
@@ -1,153 +1,153 @@
1
- <template>
2
- <div v-if="!isHideCaption || !isHideBottomPagination" class="mb-4 text-gray-500">
3
- <span class="font-bold">ผลลัพธ์ทั้งหมด:</span>
4
- จำนวน
5
- <span class="font-bold">{{ pageOptions?.totalCount || 0 }}</span>
6
- รายการ
7
- </div>
8
- <UTable :loading="status.isLoading" :columns="columns" :rows="rawData" v-bind="$attrs">
9
- <template #loading-state>
10
- <div class="flex h-60 items-center justify-center">
11
- <Icon name="i-svg-spinners:180-ring-with-bg" class="text-primary size-8" />
12
- </div>
13
- </template>
14
- <template #empty-state>
15
- <Empty />
16
- </template>
17
- <template v-for="column in columns" #[`${column.key}-data`]="{ row }" :key="column.key">
18
- <ColumnNumber
19
- v-if="column.type === COLUMN_TYPES.NUMBER"
20
- :value="transformValue(column, row)"
21
- :column="column"
22
- :class="column.class"
23
- :row="row"
24
- />
25
- <ColumnImage
26
- v-else-if="column.type === COLUMN_TYPES.IMAGE"
27
- :value="transformValue(column, row)"
28
- :column="column"
29
- :class="column.class"
30
- :row="row"
31
- />
32
- <ColumnDateTime
33
- v-else-if="column.type === COLUMN_TYPES.DATE_TIME"
34
- :value="transformValue(column, row)"
35
- :column="column"
36
- :class="column.class"
37
- :row="row"
38
- />
39
- <ColumnDate
40
- v-else-if="column.type === COLUMN_TYPES.DATE"
41
- :value="transformValue(column, row)"
42
- :column="column"
43
- :class="column.class"
44
- :row="row"
45
- />
46
- <component
47
- :is="column.component"
48
- v-else-if="column.type === COLUMN_TYPES.COMPONENT"
49
- :value="transformValue(column, row)"
50
- :column="column"
51
- :class="column.class"
52
- :row="row"
53
- />
54
- <ColumnText v-else :value="transformValue(column, row)" :column="column" :row="row" />
55
- </template>
56
-
57
- <template v-for="(_, slot) of $slots" #[slot]="scope">
58
- <slot :name="slot" v-bind="scope" />
59
- </template>
60
- </UTable>
61
- <div v-if="pageOptions" class="mt-4 flex justify-between px-3">
62
- <p class="text-sm text-gray-500">
63
- ผลลัพธ์ {{ pageBetween }} ของ {{ totalCountWithComma }} รายการ
64
- </p>
65
- <UPagination
66
- v-if="pageOptions.totalPage > 1 && !isSimplePagination && !isHideBottomPagination"
67
- v-model="page"
68
- :page-count="pageOptions.limit"
69
- :total="pageOptions.totalCount"
70
- />
71
- <SimplePagination
72
- v-if="pageOptions.totalPage > 1 && isSimplePagination"
73
- v-model="page"
74
- :page-count="pageOptions.limit"
75
- :total="pageOptions.totalCount"
76
- />
77
- </div>
78
- </template>
79
-
80
- <script lang="ts" setup>
81
- import { COLUMN_TYPES, type IColumn, type ITableOptions } from '#core/components/Table/types'
82
- import ColumnNumber from '#core/components/Table/ColumnNumber.vue'
83
- import ColumnImage from '#core/components/Table/ColumnImage.vue'
84
- import { computed, type PropType } from 'vue'
85
- import { StringHelper } from '#core/utils/StringHelper'
86
- import { ref, watch } from '#imports'
87
- import ColumnDateTime from '#core/components/Table/ColumnDateTime.vue'
88
- import Empty from '#core/components/Empty.vue'
89
- import ColumnDate from '#core/components/Table/ColumnDate.vue'
90
- import ColumnText from '#core/components/Table/ColumnText.vue'
91
-
92
- const emits = defineEmits(['pageChange'])
93
-
94
- const props = defineProps({
95
- status: {
96
- type: Object as PropType<ITableOptions['status']>,
97
- required: true,
98
- },
99
- pageOptions: {
100
- type: Object as PropType<ITableOptions['pageOptions']>,
101
- required: false,
102
- },
103
- columns: {
104
- type: Array as PropType<ITableOptions['columns']>,
105
- required: true,
106
- },
107
- rawData: {
108
- type: Array as PropType<ITableOptions['rawData']>,
109
- required: true,
110
- },
111
- isSimplePagination: {
112
- type: Boolean as PropType<ITableOptions['isSimplePagination']>,
113
- default: false,
114
- },
115
- isHideBottomPagination: {
116
- type: Boolean as PropType<ITableOptions['isHideBottomPagination']>,
117
- default: false,
118
- },
119
- isHideCaption: {
120
- type: Boolean as PropType<ITableOptions['isHideCaption']>,
121
- default: false,
122
- },
123
- })
124
-
125
- const page = ref(props.pageOptions?.currentPage || 1)
126
-
127
- const pageBetween = computed((): string => {
128
- const length = props.rawData?.length
129
-
130
- if (length === 0) {
131
- return '0'
132
- }
133
-
134
- const start = (props.pageOptions!.currentPage - 1) * props.pageOptions!.limit + 1
135
- const end = start + length - 1
136
-
137
- return `${start} - ${end}`
138
- })
139
-
140
- const transformValue = (column: IColumn, row: any) => {
141
- return column.transform ? column.transform(row[column.key], row, column) : row[column.key]
142
- }
143
-
144
- const totalCountWithComma = computed((): string => {
145
- return !props.pageOptions!.totalCount
146
- ? '0'
147
- : StringHelper.withComma(props.pageOptions!.totalCount)
148
- })
149
-
150
- watch(page, () => {
151
- emits('pageChange', page.value)
152
- })
153
- </script>
1
+ <template>
2
+ <div v-if="!isHideCaption || !isHideBottomPagination" class="mb-4 text-gray-500">
3
+ <span class="font-bold">ผลลัพธ์ทั้งหมด:</span>
4
+ จำนวน
5
+ <span class="font-bold">{{ pageOptions?.totalCount || 0 }}</span>
6
+ รายการ
7
+ </div>
8
+ <UTable :loading="status.isLoading" :columns="columns" :rows="rawData" v-bind="$attrs">
9
+ <template #loading-state>
10
+ <div class="flex h-60 items-center justify-center">
11
+ <Icon name="i-svg-spinners:180-ring-with-bg" class="text-primary size-8" />
12
+ </div>
13
+ </template>
14
+ <template #empty-state>
15
+ <Empty />
16
+ </template>
17
+ <template v-for="column in columns" #[`${column.key}-data`]="{ row }" :key="column.key">
18
+ <ColumnNumber
19
+ v-if="column.type === COLUMN_TYPES.NUMBER"
20
+ :value="transformValue(column, row)"
21
+ :column="column"
22
+ :class="column.class"
23
+ :row="row"
24
+ />
25
+ <ColumnImage
26
+ v-else-if="column.type === COLUMN_TYPES.IMAGE"
27
+ :value="transformValue(column, row)"
28
+ :column="column"
29
+ :class="column.class"
30
+ :row="row"
31
+ />
32
+ <ColumnDateTime
33
+ v-else-if="column.type === COLUMN_TYPES.DATE_TIME"
34
+ :value="transformValue(column, row)"
35
+ :column="column"
36
+ :class="column.class"
37
+ :row="row"
38
+ />
39
+ <ColumnDate
40
+ v-else-if="column.type === COLUMN_TYPES.DATE"
41
+ :value="transformValue(column, row)"
42
+ :column="column"
43
+ :class="column.class"
44
+ :row="row"
45
+ />
46
+ <component
47
+ :is="column.component"
48
+ v-else-if="column.type === COLUMN_TYPES.COMPONENT"
49
+ :value="transformValue(column, row)"
50
+ :column="column"
51
+ :class="column.class"
52
+ :row="row"
53
+ />
54
+ <ColumnText v-else :value="transformValue(column, row)" :column="column" :row="row" />
55
+ </template>
56
+
57
+ <template v-for="(_, slot) of $slots" #[slot]="scope">
58
+ <slot :name="slot" v-bind="scope" />
59
+ </template>
60
+ </UTable>
61
+ <div v-if="pageOptions" class="mt-4 flex justify-between px-3">
62
+ <p class="text-sm text-gray-500">
63
+ ผลลัพธ์ {{ pageBetween }} ของ {{ totalCountWithComma }} รายการ
64
+ </p>
65
+ <UPagination
66
+ v-if="pageOptions.totalPage > 1 && !isSimplePagination && !isHideBottomPagination"
67
+ v-model="page"
68
+ :page-count="pageOptions.limit"
69
+ :total="pageOptions.totalCount"
70
+ />
71
+ <SimplePagination
72
+ v-if="pageOptions.totalPage > 1 && isSimplePagination"
73
+ v-model="page"
74
+ :page-count="pageOptions.limit"
75
+ :total="pageOptions.totalCount"
76
+ />
77
+ </div>
78
+ </template>
79
+
80
+ <script lang="ts" setup>
81
+ import { COLUMN_TYPES, type IColumn, type ITableOptions } from '#core/components/Table/types'
82
+ import ColumnNumber from '#core/components/Table/ColumnNumber.vue'
83
+ import ColumnImage from '#core/components/Table/ColumnImage.vue'
84
+ import { computed, type PropType } from 'vue'
85
+ import { StringHelper } from '#core/utils/StringHelper'
86
+ import { ref, watch } from '#imports'
87
+ import ColumnDateTime from '#core/components/Table/ColumnDateTime.vue'
88
+ import Empty from '#core/components/Empty.vue'
89
+ import ColumnDate from '#core/components/Table/ColumnDate.vue'
90
+ import ColumnText from '#core/components/Table/ColumnText.vue'
91
+
92
+ const emits = defineEmits(['pageChange'])
93
+
94
+ const props = defineProps({
95
+ status: {
96
+ type: Object as PropType<ITableOptions['status']>,
97
+ required: true,
98
+ },
99
+ pageOptions: {
100
+ type: Object as PropType<ITableOptions['pageOptions']>,
101
+ required: false,
102
+ },
103
+ columns: {
104
+ type: Array as PropType<ITableOptions['columns']>,
105
+ required: true,
106
+ },
107
+ rawData: {
108
+ type: Array as PropType<ITableOptions['rawData']>,
109
+ required: true,
110
+ },
111
+ isSimplePagination: {
112
+ type: Boolean as PropType<ITableOptions['isSimplePagination']>,
113
+ default: false,
114
+ },
115
+ isHideBottomPagination: {
116
+ type: Boolean as PropType<ITableOptions['isHideBottomPagination']>,
117
+ default: false,
118
+ },
119
+ isHideCaption: {
120
+ type: Boolean as PropType<ITableOptions['isHideCaption']>,
121
+ default: false,
122
+ },
123
+ })
124
+
125
+ const page = ref(props.pageOptions?.currentPage || 1)
126
+
127
+ const pageBetween = computed((): string => {
128
+ const length = props.rawData?.length
129
+
130
+ if (length === 0) {
131
+ return '0'
132
+ }
133
+
134
+ const start = (props.pageOptions!.currentPage - 1) * props.pageOptions!.limit + 1
135
+ const end = start + length - 1
136
+
137
+ return `${start} - ${end}`
138
+ })
139
+
140
+ const transformValue = (column: IColumn, row: any) => {
141
+ return column.transform ? column.transform(row[column.key], row, column) : row[column.key]
142
+ }
143
+
144
+ const totalCountWithComma = computed((): string => {
145
+ return !props.pageOptions!.totalCount
146
+ ? '0'
147
+ : StringHelper.withComma(props.pageOptions!.totalCount)
148
+ })
149
+
150
+ watch(page, () => {
151
+ emits('pageChange', page.value)
152
+ })
153
+ </script>
@@ -1,16 +1,16 @@
1
- <template>
2
- {{ getValue || '-' }}
3
- </template>
4
- <script lang="ts" setup>
5
- import { computed } from 'vue'
6
- import { type IColumn } from '#core/components/Table/types'
7
- import { TimeHelper } from '#core/utils/TimeHelper'
8
-
9
- const props = defineProps<{
10
- value: any
11
- row: any
12
- column: IColumn
13
- }>()
14
-
15
- const getValue = computed<string>(() => TimeHelper.displayDate(props.value))
16
- </script>
1
+ <template>
2
+ {{ getValue || '-' }}
3
+ </template>
4
+ <script lang="ts" setup>
5
+ import { computed } from 'vue'
6
+ import { type IColumn } from '#core/components/Table/types'
7
+ import { TimeHelper } from '#core/utils/TimeHelper'
8
+
9
+ const props = defineProps<{
10
+ value: any
11
+ row: any
12
+ column: IColumn
13
+ }>()
14
+
15
+ const getValue = computed<string>(() => TimeHelper.displayDate(props.value))
16
+ </script>
@@ -1,18 +1,18 @@
1
- <template>
2
- {{ getValue || '-' }}
3
- </template>
4
- <script lang="ts" setup>
5
- import { computed } from 'vue'
6
- import { type IColumn } from '#core/components/Table/types'
7
- import { TimeHelper } from '#core/utils/TimeHelper'
8
-
9
- const props = defineProps<{
10
- value: any
11
- row: any
12
- column: IColumn
13
- }>()
14
-
15
- const getValue = computed(() => {
16
- return TimeHelper.displayDateTime(props.value)
17
- })
18
- </script>
1
+ <template>
2
+ {{ getValue || '-' }}
3
+ </template>
4
+ <script lang="ts" setup>
5
+ import { computed } from 'vue'
6
+ import { type IColumn } from '#core/components/Table/types'
7
+ import { TimeHelper } from '#core/utils/TimeHelper'
8
+
9
+ const props = defineProps<{
10
+ value: any
11
+ row: any
12
+ column: IColumn
13
+ }>()
14
+
15
+ const getValue = computed(() => {
16
+ return TimeHelper.displayDateTime(props.value)
17
+ })
18
+ </script>
@@ -1,15 +1,15 @@
1
- <template>
2
- <Image class="h-12" :src="getValue" />
3
- </template>
4
- <script lang="ts" setup>
5
- import { computed } from 'vue'
6
- import { type IColumn } from '#core/components/Table/types'
7
-
8
- const props = defineProps<{
9
- value: any
10
- row: any
11
- column: IColumn
12
- }>()
13
-
14
- const getValue = computed(() => props.value)
15
- </script>
1
+ <template>
2
+ <Image class="h-12" :src="getValue" />
3
+ </template>
4
+ <script lang="ts" setup>
5
+ import { computed } from 'vue'
6
+ import { type IColumn } from '#core/components/Table/types'
7
+
8
+ const props = defineProps<{
9
+ value: any
10
+ row: any
11
+ column: IColumn
12
+ }>()
13
+
14
+ const getValue = computed(() => props.value)
15
+ </script>
@@ -1,14 +1,14 @@
1
- <template>{{ getValue }}</template>
2
- <script lang="ts" setup>
3
- import { StringHelper } from '../../utils/StringHelper'
4
- import { computed } from 'vue'
5
- import { type IColumn } from '#core/components/Table/types'
6
-
7
- const props = defineProps<{
8
- value: any
9
- row: any
10
- column: IColumn
11
- }>()
12
-
13
- const getValue = computed(() => StringHelper.withComma(props.value))
14
- </script>
1
+ <template>{{ getValue }}</template>
2
+ <script lang="ts" setup>
3
+ import { StringHelper } from '../../utils/StringHelper'
4
+ import { computed } from 'vue'
5
+ import { type IColumn } from '#core/components/Table/types'
6
+
7
+ const props = defineProps<{
8
+ value: any
9
+ row: any
10
+ column: IColumn
11
+ }>()
12
+
13
+ const getValue = computed(() => StringHelper.withComma(props.value))
14
+ </script>