38 lines
1008 B
TypeScript
38 lines
1008 B
TypeScript
import { createRouter, createWebHashHistory } from "vue-router";
|
|
import MainView from "../views/MainView.vue";
|
|
|
|
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"),
|
|
}
|
|
]
|
|
},
|
|
{
|
|
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;
|