@@ -4,6 +4,10 @@ import type { ComputedRef } from 'vue'
4
4
import type { LocaleObject } from ' @nuxtjs/i18n'
5
5
import { Locale } from ' vant'
6
6
7
+ definePageMeta ({
8
+ level: 1 ,
9
+ })
10
+
7
11
const color = useColorMode ()
8
12
9
13
useHead ({
@@ -52,37 +56,39 @@ function onLanguageConfirm(event: { selectedOptions: PickerColumn }) {
52
56
</script >
53
57
54
58
<template >
55
- <VanCellGroup inset >
56
- <VanCell :title =" $t('menu.darkMode')" center >
57
- <template #right-icon >
58
- <VanSwitch
59
- v-model =" checked"
60
- size =" 20px"
61
- aria-label =" on/off Dark Mode"
62
- @click =" toggleDark"
63
- />
64
- </template >
65
- </VanCell >
66
-
67
- <VanCell
68
- :title =" $t('menu.language')"
69
- :value =" locales.find(i => i.code === i18n.locale.value)?.name"
70
- is-link
71
- @click =" showLanguagePicker = true"
72
- />
73
-
74
- <van-popup v-model:show =" showLanguagePicker" position =" bottom" >
75
- <van-picker
76
- v-model =" languageValues"
77
- :columns =" locales"
78
- :columns-field-names =" { text: 'name', value: 'code' }"
79
- @confirm =" onLanguageConfirm"
80
- @cancel =" showLanguagePicker = false"
59
+ <Container :padding-x =" 0" >
60
+ <VanCellGroup inset >
61
+ <VanCell :title =" $t('menu.darkMode')" center >
62
+ <template #right-icon >
63
+ <VanSwitch
64
+ v-model =" checked"
65
+ size =" 20px"
66
+ aria-label =" on/off Dark Mode"
67
+ @click =" toggleDark"
68
+ />
69
+ </template >
70
+ </VanCell >
71
+
72
+ <VanCell
73
+ :title =" $t('menu.language')"
74
+ :value =" locales.find(i => i.code === i18n.locale.value)?.name"
75
+ is-link
76
+ @click =" showLanguagePicker = true"
81
77
/>
82
- </van-popup >
83
78
84
- <template v-for =" item in menus " :key =" item .route " >
85
- <VanCell :title =" item.title" :to =" item.route" is-link />
86
- </template >
87
- </VanCellGroup >
79
+ <van-popup v-model:show =" showLanguagePicker" position =" bottom" >
80
+ <van-picker
81
+ v-model =" languageValues"
82
+ :columns =" locales"
83
+ :columns-field-names =" { text: 'name', value: 'code' }"
84
+ @confirm =" onLanguageConfirm"
85
+ @cancel =" showLanguagePicker = false"
86
+ />
87
+ </van-popup >
88
+
89
+ <template v-for =" item in menus " :key =" item .route " >
90
+ <VanCell :title =" item.title" :to =" item.route" is-link />
91
+ </template >
92
+ </VanCellGroup >
93
+ </Container >
88
94
</template >
0 commit comments