File tree Expand file tree Collapse file tree 12 files changed +78
-10
lines changed Expand file tree Collapse file tree 12 files changed +78
-10
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ declare global {
3535 const debouncedWatch : typeof import ( '@vueuse/core' ) [ 'debouncedWatch' ]
3636 const defineAsyncComponent : typeof import ( 'vue' ) [ 'defineAsyncComponent' ]
3737 const defineComponent : typeof import ( 'vue' ) [ 'defineComponent' ]
38- const defineLoader : typeof import ( 'vue-router/auto' ) [ 'defineLoader' ]
3938 const definePage : typeof import ( 'unplugin-vue-router/runtime' ) [ 'definePage' ]
4039 const describe : typeof import ( 'vitest' ) [ 'describe' ]
4140 const eagerComputed : typeof import ( '@vueuse/core' ) [ 'eagerComputed' ]
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ declare module 'vue' {
1111 NavBar : typeof import ( './components/NavBar.vue' ) [ 'default' ]
1212 RouterLink : typeof import ( 'vue-router' ) [ 'RouterLink' ]
1313 RouterView : typeof import ( 'vue-router' ) [ 'RouterView' ]
14+ TabBar : typeof import ( './components/TabBar.vue' ) [ 'default' ]
1415 VanButton : typeof import ( 'vant/es' ) [ 'Button' ]
1516 VanCell : typeof import ( 'vant/es' ) [ 'Cell' ]
1617 VanCellGroup : typeof import ( 'vant/es' ) [ 'CellGroup' ]
@@ -24,5 +25,7 @@ declare module 'vue' {
2425 VanRadio : typeof import ( 'vant/es' ) [ 'Radio' ]
2526 VanSpace : typeof import ( 'vant/es' ) [ 'Space' ]
2627 VanSwitch : typeof import ( 'vant/es' ) [ 'Switch' ]
28+ VanTabbar : typeof import ( 'vant/es' ) [ 'Tabbar' ]
29+ VanTabbarItem : typeof import ( 'vant/es' ) [ 'TabbarItem' ]
2730 }
2831}
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ const { t } = useI18n ()
3+ const active = ref (0 )
4+ </script >
5+
6+ <template >
7+ <van-tabbar v-model =" active" route >
8+ <van-tabbar-item replace icon =" home-o" to =" /" >
9+ {{ t('layouts.home') }}
10+ </van-tabbar-item >
11+ <van-tabbar-item replace icon =" user-circle-o" to =" /profile" >
12+ {{ t('layouts.profile') }}
13+ </van-tabbar-item >
14+ </van-tabbar >
15+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ const { t } = useI18n ()
3+ </script >
4+
15<template >
26 <main p =" 16" text =" gray-700 dark:gray-200" >
37 <RouterView />
48
59 <div mx-auto mb-60 pt-15 text-center text-10 text-gray-500 >
6- [Default Layout ]
10+ [{{ t('layouts.defaultLayout') }} ]
711 </div >
812 </main >
913</template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ const { t } = useI18n ()
3+ </script >
4+
15<template >
26 <main text =" gray-700 dark:gray-200" >
37 <RouterView />
48
59 <div mx-auto mt-15 text-center text-10 text-gray-500 >
6- [Home Layout ]
10+ [{{ t('layouts.homeLayout') }} ]
711 </div >
12+
13+ <TabBar />
814 </main >
915</template >
Original file line number Diff line number Diff line change 2121 "April" : " Apr" ,
2222 "May" : " May" ,
2323 "June" : " Jun"
24+ },
25+ "layouts" : {
26+ "home" : " HOME" ,
27+ "profile" : " PROFILE" ,
28+ "homeLayout" : " Home Layout" ,
29+ "defaultLayout" : " Default Layout"
30+ },
31+ "profile" : {
32+ "placeholder" : " WIP"
2433 }
2534}
Original file line number Diff line number Diff line change 2121 "April" : " 4月" ,
2222 "May" : " 5月" ,
2323 "June" : " 6月"
24+ },
25+ "layouts" : {
26+ "home" : " 首页" ,
27+ "profile" : " 我的" ,
28+ "homeLayout" : " 首页布局" ,
29+ "defaultLayout" : " 默认布局"
30+ },
31+ "profile" : {
32+ "placeholder" : " 未完成"
2433 }
2534}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import useAppStore from '@/stores/modules/app'
44import { languageColumns , locale } from ' @/utils/i18n'
55
66definePage ({
7- name: ' main ' ,
7+ name: ' home ' ,
88 meta: {
99 level: 1 ,
1010 },
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ definePage ({
3+ name: ' profile' ,
4+ meta: {
5+ level: 1 ,
6+ },
7+ })
8+
9+ const { t } = useI18n ()
10+ </script >
11+
12+ <template >
13+ <div mx-auto mb-60 pt-15 text-center text-16 text-dark dark:text-white >
14+ {{ t('profile.placeholder') }}
15+ </div >
16+ </template >
17+
18+ <route lang="yaml">
19+ meta :
20+ layout : home
21+ </route >
Original file line number Diff line number Diff line change 2525}
2626
2727::-webkit-scrollbar {
28- /* * Don't remove this line **/
29- width : 1px ;
28+ width : 0 ;
3029 background : transparent ;
3130}
3231
4847 transform : translateX (-20px );
4948 opacity : 0 ;
5049}
51-
You can’t perform that action at this time.
0 commit comments