11<template >
22 <div >
3- <VBtn :size =" props.density === 'compact' || props.density === 'comfortable' ? 'small' : 'default'" >
4- <div class =" flex-row justify-center flex items-center gap-1" >
3+ <VBtn :size =" props.density === 'compact' || props.density === 'comfortable' ? 'small' : 'default'" @click = " dialog = true " >
4+ <div class =" flex-row justify-center flex gap-1 items-center " >
55 <div class =" i-mdi:cog size-4" />
6- <div class =" text-right flex flex-col gap-1px text-2 " >
6+ <div class =" text-right text-2 flex flex-col gap-1px" >
77 <div :class =" props.totalData ? undefined:'pr-1'" >
88 {{ dataStart }}
99 </div >
1010 <div >{{ dataTotal }}</div >
1111 </div >
1212 </div >
13- < VDialog v-model = " dialog " activator = " parent " max-width = " 400 " >
14- < template # default >
15- <VCard rounded =" md" >
16- <VCardTitle class =" items-center justify-between justify-between flex!" >
17- <div >
18- {{ t('ui.paging.option') }}
19- </div >
20- <VBtn
21- icon =" i-mdi:close"
22- variant =" text"
23- @click =" onPageCancel"
24- />
25- </VCardTitle >
13+ </ VBtn >
14+ < VDialog v-model = " dialog " max-width = " 400 " >
15+ <VCard rounded =" md" >
16+ <VCardTitle class =" items-center justify-between justify-between flex!" >
17+ <div >
18+ {{ $ t('ui.paging.option') }}
19+ </div >
20+ <VBtn
21+ icon =" i-mdi:close"
22+ variant =" text"
23+ @click =" onPageCancel"
24+ />
25+ </VCardTitle >
2626
27- <VDivider class =" mb-2" />
27+ <VDivider class =" mb-2" />
2828
29- <VCardText >
30- <div class =" mb-2" >
31- {{ t('ui.paging.page') + ': ' + props.page + ' / ' + props.totalPage }}
32- </div >
33- <VNumberInput
34- v-model =" pageJump"
35- density =" comfortable"
36- :max =" props.totalPage"
37- :min =" 1"
38- variant =" outlined"
39- :label =" t('ui.paging.jumpTo')"
40- />
29+ <VCardText >
30+ <div class =" mb-2" >
31+ {{ $t('ui.paging.page') + ': ' + props.page + ' / ' + props.totalPage }}
32+ </div >
33+ <VNumberInput
34+ v-model =" pageJump"
35+ density =" comfortable"
36+ :max =" props.totalPage"
37+ :min =" 1"
38+ variant =" outlined"
39+ decimal-separator =" ."
40+ :label =" $t('ui.paging.jumpTo')"
41+ />
4142
42- <div class =" mb-2" >
43- {{ t('ui.paging.data') + ': ' + dataStart + ' / ' + dataTotal }}
44- </div >
45- <VSelect
46- v-model =" pageSize"
47- density =" comfortable"
48- variant =" outlined"
49- :disabled =" props.sizeItems == null ||props.sizeItems.length === 0"
50- :label =" t('ui.paging.pageSize')"
51- :items =" props.sizeItems"
52- />
53- </VCardText >
43+ <div class =" mb-2" >
44+ {{ $ t('ui.paging.data') + ': ' + dataStart + ' / ' + dataTotal }}
45+ </div >
46+ <VSelect
47+ v-model =" pageSize"
48+ density =" comfortable"
49+ variant =" outlined"
50+ :disabled =" props.sizeItems == null ||props.sizeItems.length === 0"
51+ :label =" $ t('ui.paging.pageSize')"
52+ :items =" props.sizeItems"
53+ />
54+ </VCardText >
5455
55- <VDivider class =" mt-2" />
56+ <VDivider class =" mt-2" />
5657
57- <VCardActions class =" justify-end my-2 flex" >
58- <VBtn
59- rounded =" md"
60- :text =" t('ui.button.close')"
61- @click =" onPageCancel"
62- />
58+ <VCardActions class =" justify-end my-2 flex" >
59+ <VBtn
60+ rounded =" md"
61+ :text =" $ t('ui.button.close')"
62+ @click =" onPageCancel"
63+ />
6364
64- <VBtn
65- color =" primary"
66- rounded =" md"
67- :text =" t('ui.button.ok')"
68- variant =" flat"
69- @click =" onPageSetting"
70- />
71- </VCardActions >
72- </VCard >
73- </template >
74- </VDialog >
75- </VBtn >
65+ <VBtn
66+ color =" primary"
67+ rounded =" md"
68+ :text =" $t('ui.button.ok')"
69+ variant =" flat"
70+ @click =" onPageSetting"
71+ />
72+ </VCardActions >
73+ </VCard >
74+ </VDialog >
7675 </div >
7776</template >
7877
@@ -95,7 +94,6 @@ const emits = defineEmits<{
9594const dataStart = computed (() => Math .max ((props .page - 1 ) * props .pageSize + 1 , 1 ).toFixed (0 ));
9695const dataTotal = computed (() => props .totalData ? props .totalData .toFixed (0 ) : ((props .totalPage - 1 ) * props .pageSize ).toFixed (0 ) + ' +' );
9796
98- const { t } = useI18n ();
9997const dialog = shallowRef <boolean >(false );
10098
10199const pageJump = shallowRef <number >(props .page );
0 commit comments