File tree 5 files changed +36
-8
lines changed
5 files changed +36
-8
lines changed Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import type { UserType } from ' ./types/userType'
3
+
4
+ const getUserTypeSelectURL = (userType : UserType ) => {
5
+ return {
6
+ name: ' membership' ,
7
+ query: { user_type: userType },
8
+ }
9
+ }
10
+ </script >
11
+
12
+ <template >
13
+ <div class =" flex gap-2" >
14
+ <RouterLink :to =" getUserTypeSelectURL('new')" > 新規入部 </RouterLink >
15
+ <RouterLink :to =" getUserTypeSelectURL('rejoin')" > 再入部 </RouterLink >
16
+ <RouterLink :to =" getUserTypeSelectURL('active')" > 継続所属 </RouterLink >
17
+ </div >
18
+ </template >
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import { useRoute } from ' vue-router' ;
3
+
4
+ import MemberShipPageUserTypeSelect from ' ./MemberShipPageUserTypeSelect.vue' ;
5
+
6
+ const route = useRoute ()
7
+ </script >
8
+
9
+ <template >
10
+ <div class =" flex flex-col gap-2" >
11
+ <MemberShipPageUserTypeSelect />
12
+ <div >route.query.user_type: {{ route.query.user_type }}</div >
13
+ </div >
14
+ </template >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ export type UserType = 'new' | 'rejoin' | 'active'
Original file line number Diff line number Diff line change 1
- import homePage from '@/pages/homePage .vue'
1
+ import HomePage from '@/pages/HomePage .vue'
2
2
import { createRouter , createWebHistory } from 'vue-router'
3
3
4
4
const router = createRouter ( {
@@ -7,15 +7,15 @@ const router = createRouter({
7
7
{
8
8
path : '/' ,
9
9
name : 'home' ,
10
- component : homePage ,
10
+ component : HomePage ,
11
11
} ,
12
12
{
13
13
path : '/membership' ,
14
14
name : 'membership' ,
15
15
// route level code-splitting
16
16
// this generates a separate chunk (About.[hash].js) for this route
17
17
// which is lazy-loaded when the route is visited.
18
- component : ( ) => import ( '@/pages/membership/membershipPage .vue' ) ,
18
+ component : ( ) => import ( '@/pages/membership/MembershipPage .vue' ) ,
19
19
} ,
20
20
] ,
21
21
} )
You can’t perform that action at this time.
0 commit comments