feat: reading permission from role
This commit is contained in:
parent
14e097bab4
commit
f09e5c8066
2 changed files with 34 additions and 0 deletions
|
|
@ -1,6 +1,25 @@
|
|||
import type { RouteRecordRaw } from "vue-router";
|
||||
|
||||
const data = await fetch("/toc.json").then((r) => r.json());
|
||||
|
||||
const manual = data.filter((v: any) => v.children);
|
||||
|
||||
const mergeManual: any[] = [];
|
||||
|
||||
manual.forEach((v: any) => mergeManual.push(...v.children));
|
||||
|
||||
const manualRoute = mergeManual.map(
|
||||
(v): { path: string; name: string; component: Function } => {
|
||||
return {
|
||||
path: v.path,
|
||||
name: "Manual",
|
||||
component: () => import("@/modules/01_manual/MainPage.vue"),
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
const route: RouteRecordRaw[] = [
|
||||
// ...manualRoute,
|
||||
{
|
||||
path: "/manual/:name",
|
||||
name: "Manual",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue