@finema/core 3.11.0 → 3.11.1
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 +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/FlexDeck/index.vue +79 -79
- package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
- package/dist/runtime/components/Form/Fields.vue +13 -13
- package/dist/runtime/components/Form/InputCheckbox/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
- package/dist/runtime/components/Form/InputCheckbox/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputCheckboxGroup/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputCheckboxGroup/index.vue +21 -21
- package/dist/runtime/components/Form/InputCheckboxGroup/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputCurrency/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputCurrency/index.vue +49 -49
- package/dist/runtime/components/Form/InputCurrency/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputDateTime/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputDateTime/index.vue +62 -62
- package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputDateTimeRange/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue +56 -56
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputMonth/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputMonth/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputNumber/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
- package/dist/runtime/components/Form/InputNumber/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputSearch/index.d.vue.ts +1 -9
- package/dist/runtime/components/Form/InputSearch/index.vue.d.ts +1 -9
- package/dist/runtime/components/Form/InputSelect/index.d.vue.ts +1 -7
- package/dist/runtime/components/Form/InputSelect/index.vue +46 -46
- package/dist/runtime/components/Form/InputSelect/index.vue.d.ts +1 -7
- package/dist/runtime/components/Form/InputSelectMultiple/index.d.vue.ts +1 -7
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue +62 -62
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue.d.ts +1 -7
- package/dist/runtime/components/Form/InputTags/index.d.vue.ts +1 -11
- package/dist/runtime/components/Form/InputTags/index.vue +54 -54
- package/dist/runtime/components/Form/InputTags/index.vue.d.ts +1 -11
- package/dist/runtime/components/Form/InputText/index.d.vue.ts +1 -7
- package/dist/runtime/components/Form/InputText/index.vue.d.ts +1 -7
- package/dist/runtime/components/Form/InputTextarea/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
- package/dist/runtime/components/Form/InputTextarea/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputTime/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputTime/index.vue +38 -38
- package/dist/runtime/components/Form/InputTime/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputToggle/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
- package/dist/runtime/components/Form/InputToggle/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputUploadDropzone/index.vue +30 -30
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +50 -50
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +50 -50
- package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +50 -50
- package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadNode.vue +18 -18
- package/dist/runtime/components/Form/InputWYSIWYG/EditorLinkPopover.vue +65 -65
- package/dist/runtime/components/Form/InputWYSIWYG/README.md +96 -96
- package/dist/runtime/components/Form/InputWYSIWYG/index.vue +41 -41
- package/dist/runtime/components/Form/fileState/EmptyState.vue +21 -21
- package/dist/runtime/components/Form/fileState/FailedState.vue +33 -33
- package/dist/runtime/components/Form/fileState/LoadingState.vue +24 -24
- package/dist/runtime/components/Form/fileState/MultipleFilesState.vue +75 -75
- package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
- package/dist/runtime/components/Form/index.vue +5 -5
- package/dist/runtime/components/Image.vue +28 -28
- package/dist/runtime/components/Log/index.vue +17 -17
- package/dist/runtime/components/Table/Base.d.vue.ts +2 -8
- package/dist/runtime/components/Table/Base.vue.d.ts +2 -8
- package/dist/runtime/components/Table/ColumnDate.vue +1 -1
- package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
- package/dist/runtime/components/Table/ColumnImage.vue +4 -4
- package/dist/runtime/components/Table/ColumnText.vue +10 -10
- package/dist/runtime/components/Table/Pagination.vue +56 -56
- package/dist/runtime/components/Table/Simple.vue +16 -16
- package/dist/runtime/server/tsconfig.json +3 -3
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Modal
|
|
3
|
-
:close="{ onClick: () => emits('close', false) }"
|
|
4
|
-
:dismissible="false"
|
|
5
|
-
:title="value?.name"
|
|
2
|
+
<Modal
|
|
3
|
+
:close="{ onClick: () => emits('close', false) }"
|
|
4
|
+
:dismissible="false"
|
|
5
|
+
:title="value?.name"
|
|
6
6
|
:ui="{
|
|
7
7
|
content: 'max-w-3xl'
|
|
8
|
-
}"
|
|
9
|
-
>
|
|
10
|
-
<template #body>
|
|
11
|
-
<div class="flex justify-center">
|
|
12
|
-
<img
|
|
13
|
-
v-if="value && isImageFromPath(value.path)"
|
|
14
|
-
:src="value.url"
|
|
15
|
-
alt="img-preview"
|
|
16
|
-
class="max-h-96 max-w-full rounded-lg"
|
|
17
|
-
/>
|
|
18
|
-
<video
|
|
19
|
-
v-else-if="value && isVideoFromPath(value.path)"
|
|
20
|
-
:src="value.url"
|
|
21
|
-
controls
|
|
22
|
-
class="max-h-96 max-w-full"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
</Modal>
|
|
8
|
+
}"
|
|
9
|
+
>
|
|
10
|
+
<template #body>
|
|
11
|
+
<div class="flex justify-center">
|
|
12
|
+
<img
|
|
13
|
+
v-if="value && isImageFromPath(value.path)"
|
|
14
|
+
:src="value.url"
|
|
15
|
+
alt="img-preview"
|
|
16
|
+
class="max-h-96 max-w-full rounded-lg"
|
|
17
|
+
/>
|
|
18
|
+
<video
|
|
19
|
+
v-else-if="value && isVideoFromPath(value.path)"
|
|
20
|
+
:src="value.url"
|
|
21
|
+
controls
|
|
22
|
+
class="max-h-96 max-w-full"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
</Modal>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script setup>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<form class="form">
|
|
3
|
-
<slot />
|
|
4
|
-
</form>
|
|
5
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<form class="form">
|
|
3
|
+
<slot />
|
|
4
|
+
</form>
|
|
5
|
+
</template>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<UseImage v-bind="$props">
|
|
3
|
-
<template #loading>
|
|
4
|
-
<slot name="loading">
|
|
5
|
-
<div
|
|
6
|
-
class="flex h-full w-full items-center justify-center"
|
|
7
|
-
>
|
|
8
|
-
<Loader
|
|
9
|
-
:loading="true"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
</slot>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<template #error>
|
|
16
|
-
<slot name="error">
|
|
17
|
-
<div
|
|
18
|
-
class="flex h-full w-full items-center justify-center"
|
|
19
|
-
>
|
|
20
|
-
<p class="text-error-400">
|
|
21
|
-
<Icon
|
|
22
|
-
name="i-heroicons:exclamation-circle-solid"
|
|
23
|
-
class="text-error-400 size-8"
|
|
24
|
-
/>
|
|
25
|
-
</p>
|
|
26
|
-
</div>
|
|
27
|
-
</slot>
|
|
28
|
-
</template>
|
|
29
|
-
</UseImage>
|
|
2
|
+
<UseImage v-bind="$props">
|
|
3
|
+
<template #loading>
|
|
4
|
+
<slot name="loading">
|
|
5
|
+
<div
|
|
6
|
+
class="flex h-full w-full items-center justify-center"
|
|
7
|
+
>
|
|
8
|
+
<Loader
|
|
9
|
+
:loading="true"
|
|
10
|
+
/>
|
|
11
|
+
</div>
|
|
12
|
+
</slot>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<template #error>
|
|
16
|
+
<slot name="error">
|
|
17
|
+
<div
|
|
18
|
+
class="flex h-full w-full items-center justify-center"
|
|
19
|
+
>
|
|
20
|
+
<p class="text-error-400">
|
|
21
|
+
<Icon
|
|
22
|
+
name="i-heroicons:exclamation-circle-solid"
|
|
23
|
+
class="text-error-400 size-8"
|
|
24
|
+
/>
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</slot>
|
|
28
|
+
</template>
|
|
29
|
+
</UseImage>
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<DevOnly>
|
|
3
|
-
<TeleportSafe
|
|
4
|
-
to="#dev-logs"
|
|
5
|
-
>
|
|
6
|
-
<LogItem
|
|
7
|
-
v-if="typeof data !== 'undefined'"
|
|
8
|
-
:data="data"
|
|
9
|
-
:title="title"
|
|
10
|
-
/>
|
|
11
|
-
<LogItem
|
|
12
|
-
v-for="(item, index) in dataItems"
|
|
13
|
-
:key="index"
|
|
14
|
-
:data="item"
|
|
15
|
-
:title="`${title} #${index + 1}`"
|
|
16
|
-
/>
|
|
17
|
-
</TeleportSafe>
|
|
18
|
-
</DevOnly>
|
|
2
|
+
<DevOnly>
|
|
3
|
+
<TeleportSafe
|
|
4
|
+
to="#dev-logs"
|
|
5
|
+
>
|
|
6
|
+
<LogItem
|
|
7
|
+
v-if="typeof data !== 'undefined'"
|
|
8
|
+
:data="data"
|
|
9
|
+
:title="title"
|
|
10
|
+
/>
|
|
11
|
+
<LogItem
|
|
12
|
+
v-for="(item, index) in dataItems"
|
|
13
|
+
:key="index"
|
|
14
|
+
:data="item"
|
|
15
|
+
:title="`${title} #${index + 1}`"
|
|
16
|
+
/>
|
|
17
|
+
</TeleportSafe>
|
|
18
|
+
</DevOnly>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script setup>
|
|
@@ -4,7 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
options: ITableOptions<any> & ISimpleTableOptions<any>;
|
|
5
5
|
ui?: (typeof tableTheme)['slots'];
|
|
6
6
|
};
|
|
7
|
-
declare var __VLS_22: {}, __VLS_29: {}, __VLS_31: {}, __VLS_45:
|
|
7
|
+
declare var __VLS_22: {}, __VLS_29: {}, __VLS_31: {}, __VLS_45: any, __VLS_46: any;
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
9
|
[K in NonNullable<typeof __VLS_45>]?: (props: typeof __VLS_46) => any;
|
|
10
10
|
} & {
|
|
@@ -14,13 +14,7 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
} & {
|
|
15
15
|
error?: (props: typeof __VLS_31) => any;
|
|
16
16
|
};
|
|
17
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
-
search: (...args: any[]) => void;
|
|
19
|
-
pageChange: (...args: any[]) => void;
|
|
20
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
-
onSearch?: ((...args: any[]) => any) | undefined;
|
|
22
|
-
onPageChange?: ((...args: any[]) => any) | undefined;
|
|
23
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
19
|
declare const _default: typeof __VLS_export;
|
|
26
20
|
export default _default;
|
|
@@ -4,7 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
options: ITableOptions<any> & ISimpleTableOptions<any>;
|
|
5
5
|
ui?: (typeof tableTheme)['slots'];
|
|
6
6
|
};
|
|
7
|
-
declare var __VLS_22: {}, __VLS_29: {}, __VLS_31: {}, __VLS_45:
|
|
7
|
+
declare var __VLS_22: {}, __VLS_29: {}, __VLS_31: {}, __VLS_45: any, __VLS_46: any;
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
9
|
[K in NonNullable<typeof __VLS_45>]?: (props: typeof __VLS_46) => any;
|
|
10
10
|
} & {
|
|
@@ -14,13 +14,7 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
} & {
|
|
15
15
|
error?: (props: typeof __VLS_31) => any;
|
|
16
16
|
};
|
|
17
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
-
search: (...args: any[]) => void;
|
|
19
|
-
pageChange: (...args: any[]) => void;
|
|
20
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
-
onSearch?: ((...args: any[]) => any) | undefined;
|
|
22
|
-
onPageChange?: ((...args: any[]) => any) | undefined;
|
|
23
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
19
|
declare const _default: typeof __VLS_export;
|
|
26
20
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<NuxtLink
|
|
3
|
-
v-if="column.meta?.link"
|
|
4
|
-
v-bind="column.meta.link"
|
|
5
|
-
>
|
|
6
|
-
{{ getValue }}
|
|
7
|
-
</NuxtLink>
|
|
8
|
-
|
|
9
|
-
<span v-else>
|
|
10
|
-
{{ getValue }}
|
|
11
|
-
</span>
|
|
2
|
+
<NuxtLink
|
|
3
|
+
v-if="column.meta?.link"
|
|
4
|
+
v-bind="column.meta.link"
|
|
5
|
+
>
|
|
6
|
+
{{ getValue }}
|
|
7
|
+
</NuxtLink>
|
|
8
|
+
|
|
9
|
+
<span v-else>
|
|
10
|
+
{{ getValue }}
|
|
11
|
+
</span>
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script setup>
|
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
3
|
:class="
|
|
4
4
|
theme.paginationContainer({
|
|
5
5
|
class: [ui?.paginationContainer]
|
|
6
6
|
})
|
|
7
|
-
"
|
|
8
|
-
>
|
|
9
|
-
<div
|
|
7
|
+
"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
10
|
:class="
|
|
11
11
|
theme.paginationInfoWrapper({
|
|
12
12
|
class: [ui?.paginationInfoWrapper]
|
|
13
13
|
})
|
|
14
|
-
"
|
|
15
|
-
>
|
|
16
|
-
<USelect
|
|
17
|
-
v-if="options.pageOptions && !options.isHideLimitSelect"
|
|
18
|
-
size="lg"
|
|
19
|
-
trailing="รายการ"
|
|
14
|
+
"
|
|
15
|
+
>
|
|
16
|
+
<USelect
|
|
17
|
+
v-if="options.pageOptions && !options.isHideLimitSelect"
|
|
18
|
+
size="lg"
|
|
19
|
+
trailing="รายการ"
|
|
20
20
|
:class="
|
|
21
21
|
theme.paginationLimitSelect({
|
|
22
22
|
class: [ui?.paginationLimitSelect, 'cursor-pointer']
|
|
23
23
|
})
|
|
24
|
-
"
|
|
25
|
-
:items="pageLimitItems"
|
|
26
|
-
:model-value="pageLimit"
|
|
27
|
-
@update:modelValue="emits('pageLimitChange', $event)"
|
|
28
|
-
>
|
|
29
|
-
<template #default="{ modelValue }">
|
|
30
|
-
<p
|
|
24
|
+
"
|
|
25
|
+
:items="pageLimitItems"
|
|
26
|
+
:model-value="pageLimit"
|
|
27
|
+
@update:modelValue="emits('pageLimitChange', $event)"
|
|
28
|
+
>
|
|
29
|
+
<template #default="{ modelValue }">
|
|
30
|
+
<p
|
|
31
31
|
:class="
|
|
32
32
|
theme.paginationLimitSelectLabel({
|
|
33
33
|
class: [ui?.paginationLimitSelectLabel]
|
|
34
34
|
})
|
|
35
|
-
"
|
|
36
|
-
>
|
|
37
|
-
{{ modelValue }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}
|
|
38
|
-
</p>
|
|
39
|
-
</template>
|
|
40
|
-
</USelect>
|
|
41
|
-
<p
|
|
35
|
+
"
|
|
36
|
+
>
|
|
37
|
+
{{ modelValue }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}
|
|
38
|
+
</p>
|
|
39
|
+
</template>
|
|
40
|
+
</USelect>
|
|
41
|
+
<p
|
|
42
42
|
:class="
|
|
43
43
|
theme.paginationInfo({
|
|
44
44
|
class: [ui?.paginationInfo, '']
|
|
45
45
|
})
|
|
46
|
-
"
|
|
47
|
-
>
|
|
48
|
-
<span v-if="options.pageOptions">{{ pageBetween }} {{ appConfig.core?.locale === "th" ? "\u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "of total" }} {{ totalCountWithComma }}</span>
|
|
49
|
-
<span v-else>{{ appConfig.core?.locale === "th" ? "\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "Total" }} {{ options.rawData.length }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}</span>
|
|
50
|
-
</p>
|
|
51
|
-
</div>
|
|
52
|
-
<UPagination
|
|
53
|
-
v-if="options.pageOptions && options.pageOptions.totalPage > 1"
|
|
54
|
-
:page="page"
|
|
55
|
-
:default-page="options.pageOptions?.currentPage || 1"
|
|
56
|
-
:items-per-page="options.pageOptions.limit"
|
|
57
|
-
:total="options.pageOptions.totalCount"
|
|
58
|
-
:to="options.isRouteChange ? to : void 0"
|
|
59
|
-
show-edges
|
|
60
|
-
variant="outline"
|
|
61
|
-
color="neutral"
|
|
62
|
-
active-color="neutral"
|
|
63
|
-
active-variant="subtle"
|
|
64
|
-
@update:page="emits('pageChange', $event)"
|
|
65
|
-
>
|
|
66
|
-
<template #item="{ item, page }">
|
|
67
|
-
<Button
|
|
68
|
-
:variant="page === item.value ? 'subtle' : 'outline'"
|
|
69
|
-
:color="page === item.value ? 'neutral' : 'neutral'"
|
|
70
|
-
:label="String(NumberHelper.withComma(item.value))"
|
|
71
|
-
:ui="{ label: themePagination.label }"
|
|
72
|
-
:to="to?.(item.value)"
|
|
73
|
-
square
|
|
74
|
-
/>
|
|
75
|
-
</template>
|
|
76
|
-
</UPagination>
|
|
77
|
-
</div>
|
|
46
|
+
"
|
|
47
|
+
>
|
|
48
|
+
<span v-if="options.pageOptions">{{ pageBetween }} {{ appConfig.core?.locale === "th" ? "\u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "of total" }} {{ totalCountWithComma }}</span>
|
|
49
|
+
<span v-else>{{ appConfig.core?.locale === "th" ? "\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "Total" }} {{ options.rawData.length }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}</span>
|
|
50
|
+
</p>
|
|
51
|
+
</div>
|
|
52
|
+
<UPagination
|
|
53
|
+
v-if="options.pageOptions && options.pageOptions.totalPage > 1"
|
|
54
|
+
:page="page"
|
|
55
|
+
:default-page="options.pageOptions?.currentPage || 1"
|
|
56
|
+
:items-per-page="options.pageOptions.limit"
|
|
57
|
+
:total="options.pageOptions.totalCount"
|
|
58
|
+
:to="options.isRouteChange ? to : void 0"
|
|
59
|
+
show-edges
|
|
60
|
+
variant="outline"
|
|
61
|
+
color="neutral"
|
|
62
|
+
active-color="neutral"
|
|
63
|
+
active-variant="subtle"
|
|
64
|
+
@update:page="emits('pageChange', $event)"
|
|
65
|
+
>
|
|
66
|
+
<template #item="{ item, page }">
|
|
67
|
+
<Button
|
|
68
|
+
:variant="page === item.value ? 'subtle' : 'outline'"
|
|
69
|
+
:color="page === item.value ? 'neutral' : 'neutral'"
|
|
70
|
+
:label="String(NumberHelper.withComma(item.value))"
|
|
71
|
+
:ui="{ label: themePagination.label }"
|
|
72
|
+
:to="to?.(item.value)"
|
|
73
|
+
square
|
|
74
|
+
/>
|
|
75
|
+
</template>
|
|
76
|
+
</UPagination>
|
|
77
|
+
</div>
|
|
78
78
|
</template>
|
|
79
79
|
|
|
80
80
|
<script setup>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Base
|
|
3
|
-
v-bind="$attrs"
|
|
2
|
+
<Base
|
|
3
|
+
v-bind="$attrs"
|
|
4
4
|
:options="{
|
|
5
5
|
...options,
|
|
6
6
|
pageOptions,
|
|
7
7
|
isHideLimitSelect: true,
|
|
8
8
|
rawData: itemsByPage
|
|
9
|
-
}"
|
|
10
|
-
:ui="ui"
|
|
11
|
-
@page-change="onPageChange"
|
|
12
|
-
>
|
|
13
|
-
<template
|
|
14
|
-
v-for="(_, slot) of $slots"
|
|
15
|
-
#[slot]="slotProps"
|
|
16
|
-
>
|
|
17
|
-
<slot
|
|
18
|
-
:name="slot"
|
|
19
|
-
v-bind="slotProps || {}"
|
|
20
|
-
/>
|
|
21
|
-
</template>
|
|
22
|
-
</Base>
|
|
9
|
+
}"
|
|
10
|
+
:ui="ui"
|
|
11
|
+
@page-change="onPageChange"
|
|
12
|
+
>
|
|
13
|
+
<template
|
|
14
|
+
v-for="(_, slot) of $slots"
|
|
15
|
+
#[slot]="slotProps"
|
|
16
|
+
>
|
|
17
|
+
<slot
|
|
18
|
+
:name="slot"
|
|
19
|
+
v-bind="slotProps || {}"
|
|
20
|
+
/>
|
|
21
|
+
</template>
|
|
22
|
+
</Base>
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<script setup>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../.nuxt/tsconfig.server.json",
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../.nuxt/tsconfig.server.json",
|
|
3
|
+
}
|