Skip to content

Commit 074f9a6

Browse files
committed
🐛 vuetify 3.9.0 decimal-separator, $t replace t #279
1 parent a9cdbff commit 074f9a6

File tree

6 files changed

+84
-85
lines changed

6 files changed

+84
-85
lines changed

layers/desktop/components/PagingOpt.vue

Lines changed: 59 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,77 @@
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<{
9594
const dataStart = computed(() => Math.max((props.page - 1) * props.pageSize + 1, 1).toFixed(0));
9695
const dataTotal = computed(() => props.totalData ? props.totalData.toFixed(0) : ((props.totalPage - 1) * props.pageSize).toFixed(0) + '+');
9796
98-
const { t } = useI18n();
9997
const dialog = shallowRef<boolean>(false);
10098
10199
const pageJump = shallowRef<number>(props.page);

layers/mobile/components/PagingOpt.vue

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
size="small"
77
@click="dialog = true"
88
>
9-
<div class="flex-row justify-center flex items-center gap-1">
9+
<div class="flex-row justify-center flex gap-1 items-center">
1010
<div class="i-mdi:cog size-4" />
11-
<div class="text-right flex flex-col gap-1px text-2">
11+
<div class="text-right text-2 flex flex-col gap-1px">
1212
<div :class="props.totalData ? undefined:'pr-1'">
1313
{{ dataStart }}
1414
</div>
@@ -23,7 +23,7 @@
2323
>
2424
<IonHeader>
2525
<IonToolbar>
26-
<IonTitle>{{ t('ui.paging.option') }}</IonTitle>
26+
<IonTitle>{{ $t('ui.paging.option') }}</IonTitle>
2727
<IonButtons slot="end">
2828
<IonButton @click="onPageCancel">
2929
<IonIcon class="i-mdi:close" />
@@ -34,26 +34,26 @@
3434
<IonContent>
3535
<IonList inset>
3636
<IonItem lines="none">
37-
{{ t('ui.paging.page') + ': ' + props.page + ' / ' + props.totalPage }}
37+
{{ $t('ui.paging.page') + ': ' + props.page + ' / ' + props.totalPage }}
3838
</IonItem>
3939
<IonItem>
4040
<IonInput
4141
v-model.number="pageJump"
42-
:label="t('ui.paging.jumpTo')"
42+
:label="$t('ui.paging.jumpTo')"
4343
label-placement="floating"
4444
type="number"
4545
:min="1"
4646
:max="props.totalPage"
4747
/>
4848
</IonItem>
4949
<IonItem lines="none">
50-
{{ t('ui.paging.data') + ': ' + dataStart + ' / ' + dataTotal }}
50+
{{ $t('ui.paging.data') + ': ' + dataStart + ' / ' + dataTotal }}
5151
</IonItem>
5252
<IonItem>
5353
<IonSelect
5454
v-model="pageSize"
5555
:disabled="!props.sizeItems?.length"
56-
:label="t('ui.paging.pageSize')"
56+
:label="$t('ui.paging.pageSize')"
5757
label-placement="floating"
5858
>
5959
<IonSelectOption v-for="size in props.sizeItems" :key="size" :value="size">
@@ -69,15 +69,15 @@
6969
size="default"
7070
@click="onPageCancel"
7171
>
72-
{{ t('ui.button.close') }}
72+
{{ $t('ui.button.close') }}
7373
</IonButton>
7474
<IonButton
7575
slot="end"
7676
color="primary"
7777
size="default"
7878
@click="onPageSetting"
7979
>
80-
{{ t('ui.button.ok') }}
80+
{{ $t('ui.button.ok') }}
8181
</IonButton>
8282
</IonItem>
8383
</IonList>
@@ -105,7 +105,6 @@ const emits = defineEmits<{
105105
const dataStart = computed(() => Math.max((props.page - 1) * props.pageSize + 1, 1).toFixed(0));
106106
const dataTotal = computed(() => props.totalData ? props.totalData.toFixed(0) : ((props.totalPage - 1) * props.pageSize).toFixed(0) + '+');
107107
108-
const { t } = useI18n();
109108
const dialog = shallowRef<boolean>(false);
110109
111110
const pageJump = shallowRef<number>(props.page);

plays/2-play-web/pages/13-paging-dark.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
@change-page="onPageChange"
3838
/>
3939
<div class="border-sm my-4 p-4">
40-
{{ t('ui.paging.page') + ': '+ page +', '+ t('ui.paging.pageSize') +': '+ size }}
40+
{{ $t('ui.paging.page') + ': '+ page +', '+ $t('ui.paging.pageSize') +': '+ size }}
4141
</div>
4242
<div>
4343
<VSelect
@@ -59,13 +59,13 @@
5959
<div class="border border-opacity-100 my-4 border-primary p-4">
6060
border border-primary border-opacity-100
6161
</div>
62-
<div class="border border-opacity-100 my-4 border-primary bg-primary p-4 text-primary-contrast hover:_bg-secondary">
62+
<div class="border border-opacity-100 my-4 border-primary bg-primary text-primary-contrast p-4 hover:_bg-secondary">
6363
text-primary-contrast bg-primary hover:_bg-secondary ❌ for !important
6464
</div>
65-
<div class="border border-opacity-100 my-4 border-primary _bg-primary p-4 text-primary-contrast hover:_bg-secondary">
65+
<div class="border border-opacity-100 my-4 border-primary text-primary-contrast p-4 _bg-primary hover:_bg-secondary">
6666
text-primary-contrast _bg-primary hover:_bg-secondary ✅
6767
</div>
68-
<div class="border border-opacity-100 my-4 flex flex-col border-primary">
68+
<div class="border border-opacity-100 my-4 border-primary flex flex-col">
6969
<div class="bg-primary">
7070
bg-primary vuetify with color
7171
</div>
@@ -101,6 +101,9 @@
101101
</template>
102102

103103
<script lang="ts" setup>
104+
// import { useLocale } from 'vuetify';
105+
// https://github.com/vuetifyjs/nuxt-module/issues/324
106+
104107
definePageMeta({
105108
name: 'Paging Bar and Dark Mode',
106109
});
@@ -114,7 +117,8 @@ const totalPage = computed(() => Math.floor((totalData - 1) / size.value) + 1);
114117
const density = shallowRef<undefined>();
115118
const visible = shallowRef<undefined>();
116119
117-
const { t } = useI18n();
120+
// const locale = useLocale();
121+
// console.log('locale', locale);
118122
function onPageChange(pg: number, sz: number) {
119123
console.log('onPageChange', pg, sz);
120124
page.value = pg;

plays/3-play-mob/pages/00-index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<AppTab>
33
<template #title>
4-
<div class="flex-row flex items-center gap-2">
4+
<div class="flex-row flex gap-2 items-center">
55
<DpiImg :srcset="[storm1, storm2, storm3, storm4]" alt="movingkite logo" class="p-2" />
66
<div>Index</div>
77
</div>
88
</template>
9-
<div class="text-left p-4">
9+
<div class="p-4 flex flex-col items-start">
1010
<IonButton
1111
v-for="rt in pageRoutes"
1212
:key="rt.path"

plays/3-play-mob/pages/13-paging-dark.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
@change-page="onPageChange"
3737
/>
3838
<div class="border border-solid my-4 border-primary p-4">
39-
{{ t('ui.paging.page') + ': '+ page +', '+ t('ui.paging.pageSize') +': '+ size }}
39+
{{ $t('ui.paging.page') + ': '+ page +', '+ $t('ui.paging.pageSize') +': '+ size }}
4040
</div>
4141
<div class="mt-4">
4242
<IonSelect v-model="visible" label="visible">
@@ -48,13 +48,13 @@
4848
<div class="border border-solid my-4 border-primary p-4">
4949
border border-solid border-primary
5050
</div>
51-
<div class="border border-solid my-4 border-primary p-4 text-secondary">
51+
<div class="border border-solid my-4 border-primary text-secondary p-4">
5252
border border-solid border-primary text-secondary
5353
</div>
54-
<div class="border border-solid my-4 border-primary bg-primary-lighten p-4 text-primary-contrast hover:bg-secondary">
54+
<div class="border border-solid my-4 border-primary hover:bg-secondary text-primary-contrast p-4 bg-primary-lighten">
5555
text-primary-contrast bg-primary hover:bg-secondary
5656
</div>
57-
<div class="border border-solid my-4 flex flex-col border-primary">
57+
<div class="border border-solid my-4 border-primary flex flex-col">
5858
<div class="bg-primary">
5959
bg-primary unocss
6060
</div>
@@ -94,8 +94,6 @@ const totalPage = computed(() => Math.floor((totalData - 1) / size.value) + 1);
9494
const visible = shallowRef<undefined>();
9595
const visibleItem = [3, 4, 5, 6, 7, 8, 9];
9696
97-
const { t } = useI18n();
98-
9997
function onPageChange(pg: number, sz: number) {
10098
console.log('onPageChange', pg, sz);
10199
page.value = pg;

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ catalogs:
5353
"vitest": "3.2.4" # 3.2.4 | https://github.com/nuxt/nuxt/blob/v3.17.6/package.json
5454
"vue-tsc": "2.2.12" # 3.0.0 | https://github.com/nuxt/nuxt/blob/v3.17.6/package.json ⚠️ peer vite-plugin-checker 0.9.3
5555
desktop:
56-
"vuetify": "3.9.0" # https://github.com/vuetifyjs/vuetify/blob/master/package.json
56+
"vuetify": "3.9.0" # vuetify@^3.7.0 https://github.com/vuetifyjs/nuxt-module/blob/main/package.json
5757
"vuetify-nuxt-module": "0.18.7" # nuxt@^3.10.2 | https://github.com/vuetifyjs/nuxt-module/blob/main/package.json
5858
mobile:
5959
"@capacitor/preferences": "7.0.1" # @capacitor/core@^7.0.0 | https://github.com/ionic-team/ionic-framework/blob/v8.6.4/core/package.json

0 commit comments

Comments
 (0)