48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import { RouteRecordRaw } from "vue-router";
|
|
|
|
import BaseLayout from "@/layouts/base-layout/index.vue";
|
|
const routes: RouteRecordRaw[] = [
|
|
{
|
|
path: "/",
|
|
component: BaseLayout,
|
|
redirect: "/home",
|
|
children: [
|
|
{
|
|
path: "/home",
|
|
name: "home",
|
|
component: () => import("@/pages/home/index.vue"),
|
|
meta: { keepAlive: true }
|
|
},
|
|
{
|
|
path: "/write",
|
|
name: "write",
|
|
component: () => import("@/pages/write/index.vue"),
|
|
meta: { keepAlive: false }
|
|
},
|
|
{
|
|
path: "/test",
|
|
component: () => import("@/pages/test/index.vue")
|
|
},
|
|
{
|
|
path: "/setting",
|
|
component: () => import("@/pages/setting/index.vue"),
|
|
redirect: "/setting/account",
|
|
meta: { keepAlive: true },
|
|
children: [
|
|
{
|
|
path: "account",
|
|
component: () => import("@/pages/setting/account/index.vue"),
|
|
meta: { keepAlive: true }
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: "/login",
|
|
component: () => import("@/pages/auth/login.vue")
|
|
}
|
|
];
|
|
|
|
export default routes;
|