1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import { createRouter, createWebHistory } from "@ionic/vue-router";
import { RouteRecordRaw } from "vue-router";
import HomePage from "../views/HomePage.vue";
import Sign from "../views/Sign.vue";
import UserInfo from "../views/UserInfo.vue";
const routes: Array<RouteRecordRaw> = [
{ path: "/", redirect: "/home" },
{
path: "/home",
component: HomePage,
name: "HomePage",
},
{
path: "/sign",
component: Sign,
name: "Sign",
},
{
path: "/me",
component: UserInfo,
name: "UserInfo",
},
];
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes,
});
export default router;
|