wails-app-dock/frontend/src/router/index.ts

38 lines
1008 B
TypeScript
Raw Normal View History

2024-02-17 17:00:13 +08:00
import { createRouter, createWebHashHistory } from "vue-router";
import MainView from "../views/MainView.vue";
2024-02-17 17:00:13 +08:00
const router = createRouter({
history: createWebHashHistory(),
routes: [
{
path: "/",
redirect: "/main/markdown"
},
{
path: "/main",
name: "main",
component: MainView,
children: [
{
path: "/main/markdown",
name: "markdown",
// route level code-splitting
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import("@/components/markdown/tui-editor.vue"),
}
]
2024-02-17 17:00:13 +08:00
},
{
path: "/about",
name: "about",
// route level code-splitting
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import("../views/AboutView.vue"),
},
],
});
export default router;