1
This commit is contained in:
32
src/router/index.ts
Normal file
32
src/router/index.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: "/",
|
||||
redirect: "/home",
|
||||
component: () => import("@/views/layout.vue"),
|
||||
children: [
|
||||
{
|
||||
path: "/home",
|
||||
component: () => import("@/views/home.vue"),
|
||||
},
|
||||
{
|
||||
path: "/alarm",
|
||||
component: () => import("@/views/alarm.vue"),
|
||||
},
|
||||
{
|
||||
path: "/management",
|
||||
component: () => import("@/views/management.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/demo",
|
||||
component: () => import("@/views/demo.vue"),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
export default router;
|
Reference in New Issue
Block a user