@ramathibodi/nuxt-commons 0.0.5 → 0.0.6
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.
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -17,7 +17,7 @@ const module = defineNuxtModule({
|
|
|
17
17
|
pathPrefix: true,
|
|
18
18
|
global: true
|
|
19
19
|
});
|
|
20
|
-
addImportsDir(resolver.resolve("runtime/composables"));
|
|
20
|
+
addImportsDir(resolver.resolve("runtime/composables/**"));
|
|
21
21
|
addTypeTemplate({
|
|
22
22
|
filename: "types/modules.d.ts",
|
|
23
23
|
getContents: () => `
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
label: string;
|
|
6
|
+
value?: string | String | null | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
10
|
+
label: '', value: ''
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
</script>
|
|
14
|
+
<template>
|
|
15
|
+
<v-card variant="flat">
|
|
16
|
+
<VCardSubtitle class="ma-0 pa-0">
|
|
17
|
+
<slot name="label">
|
|
18
|
+
{{ label }}
|
|
19
|
+
</slot>
|
|
20
|
+
</VCardSubtitle>
|
|
21
|
+
<VCardText class="text-h6 pa-0 mb-2">
|
|
22
|
+
<slot name="value">
|
|
23
|
+
{{ value }}
|
|
24
|
+
</slot>
|
|
25
|
+
|
|
26
|
+
</VCardText>
|
|
27
|
+
</v-card>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style lang="">
|
|
31
|
+
|
|
32
|
+
</style>
|
|
@@ -68,7 +68,7 @@ export const Datetime = () => ({
|
|
|
68
68
|
setDateTime: function(inputDate, locale = "EN") {
|
|
69
69
|
if (inputDate.isValid) {
|
|
70
70
|
if (inputDate.year - DateTime.now().year > 300)
|
|
71
|
-
inputDate.set({ year: inputDate.year - 543 });
|
|
71
|
+
inputDate = inputDate.set({ year: inputDate.year - 543 });
|
|
72
72
|
}
|
|
73
73
|
this.luxonDateTime = inputDate;
|
|
74
74
|
if (locale == "TH")
|