♻️(document): 调整文档结构
This commit is contained in:
16
package/document-layer/src/router/index.ts
Normal file
16
package/document-layer/src/router/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import {
|
||||
createRouter as _createRouter,
|
||||
createWebHistory,
|
||||
Router,
|
||||
} from "vue-router";
|
||||
import zhCN from "./zh-CN";
|
||||
|
||||
const routes = [...zhCN];
|
||||
|
||||
export function createRouter(): Router {
|
||||
const baseUrl = import.meta.env.BASE_URL;
|
||||
return _createRouter({
|
||||
history: createWebHistory(baseUrl),
|
||||
routes: routes,
|
||||
});
|
||||
}
|
||||
20
package/document-layer/src/router/zh-CN.ts
Normal file
20
package/document-layer/src/router/zh-CN.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import BaseLayout from "../layouts/Layout.vue";
|
||||
|
||||
const zhCN = [
|
||||
{
|
||||
path: "/",
|
||||
redirect: "/zh-CN/index",
|
||||
component: BaseLayout,
|
||||
meta: { title: "首页" },
|
||||
children: [
|
||||
{
|
||||
path: "/zh-CN/index",
|
||||
component: () => import("../../docs/zh-CN/index.md"),
|
||||
|
||||
meta: { title: "指南" },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default zhCN;
|
||||
Reference in New Issue
Block a user