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 {
35
35
const debouncedWatch : typeof import ( '@vueuse/core' ) [ 'debouncedWatch' ]
36
36
const defineAsyncComponent : typeof import ( 'vue' ) [ 'defineAsyncComponent' ]
37
37
const defineComponent : typeof import ( 'vue' ) [ 'defineComponent' ]
38
- const defineLoader : typeof import ( 'vue-router/auto' ) [ 'defineLoader' ]
39
38
const definePage : typeof import ( 'unplugin-vue-router/runtime' ) [ 'definePage' ]
40
39
const describe : typeof import ( 'vitest' ) [ 'describe' ]
41
40
const eagerComputed : typeof import ( '@vueuse/core' ) [ 'eagerComputed' ]
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ declare module 'vue' {
11
11
NavBar : typeof import ( './components/NavBar.vue' ) [ 'default' ]
12
12
RouterLink : typeof import ( 'vue-router' ) [ 'RouterLink' ]
13
13
RouterView : typeof import ( 'vue-router' ) [ 'RouterView' ]
14
+ TabBar : typeof import ( './components/TabBar.vue' ) [ 'default' ]
14
15
VanButton : typeof import ( 'vant/es' ) [ 'Button' ]
15
16
VanCell : typeof import ( 'vant/es' ) [ 'Cell' ]
16
17
VanCellGroup : typeof import ( 'vant/es' ) [ 'CellGroup' ]
@@ -24,5 +25,7 @@ declare module 'vue' {
24
25
VanRadio : typeof import ( 'vant/es' ) [ 'Radio' ]
25
26
VanSpace : typeof import ( 'vant/es' ) [ 'Space' ]
26
27
VanSwitch : typeof import ( 'vant/es' ) [ 'Switch' ]
28
+ VanTabbar : typeof import ( 'vant/es' ) [ 'Tabbar' ]
29
+ VanTabbarItem : typeof import ( 'vant/es' ) [ 'TabbarItem' ]
27
30
}
28
31
}
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
+
1
5
<template >
2
6
<main p =" 16" text =" gray-700 dark:gray-200" >
3
7
<RouterView />
4
8
5
9
<div mx-auto mb-60 pt-15 text-center text-10 text-gray-500 >
6
- [Default Layout ]
10
+ [{{ t('layouts.defaultLayout') }} ]
7
11
</div >
8
12
</main >
9
13
</template >
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ const { t } = useI18n ()
3
+ </script >
4
+
1
5
<template >
2
6
<main text =" gray-700 dark:gray-200" >
3
7
<RouterView />
4
8
5
9
<div mx-auto mt-15 text-center text-10 text-gray-500 >
6
- [Home Layout ]
10
+ [{{ t('layouts.homeLayout') }} ]
7
11
</div >
12
+
13
+ <TabBar />
8
14
</main >
9
15
</template >
Original file line number Diff line number Diff line change 21
21
"April" : " Apr" ,
22
22
"May" : " May" ,
23
23
"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"
24
33
}
25
34
}
Original file line number Diff line number Diff line change 21
21
"April" : " 4月" ,
22
22
"May" : " 5月" ,
23
23
"June" : " 6月"
24
+ },
25
+ "layouts" : {
26
+ "home" : " 首页" ,
27
+ "profile" : " 我的" ,
28
+ "homeLayout" : " 首页布局" ,
29
+ "defaultLayout" : " 默认布局"
30
+ },
31
+ "profile" : {
32
+ "placeholder" : " 未完成"
24
33
}
25
34
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import useAppStore from '@/stores/modules/app'
4
4
import { languageColumns , locale } from ' @/utils/i18n'
5
5
6
6
definePage ({
7
- name: ' main ' ,
7
+ name: ' home ' ,
8
8
meta: {
9
9
level: 1 ,
10
10
},
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 25
25
}
26
26
27
27
::-webkit-scrollbar {
28
- /* * Don't remove this line **/
29
- width : 1px ;
28
+ width : 0 ;
30
29
background : transparent ;
31
30
}
32
31
48
47
transform : translateX (-20px );
49
48
opacity : 0 ;
50
49
}
51
-
You can’t perform that action at this time.
0 commit comments