This commit is contained in:
六如
2024-10-04 21:48:38 +08:00
parent 00da3cc0a9
commit c08fec74c9
987 changed files with 24735 additions and 22137 deletions

View File

@@ -0,0 +1,37 @@
// 模拟后端动态生成路由
import { defineFakeRoute } from "vite-plugin-fake-server/client";
/**
* 服务管理
*/
const apiRouter = {
path: "/serviceManage",
meta: {
title: "服务管理",
icon: "ri:server-line",
rank: 10
},
children: [
{
path: "/serviceManage/apiManage/index",
name: "ApiManage",
meta: {
title: "接口管理",
roles: ["admin"]
}
}
]
};
export default defineFakeRoute([
{
url: "/get-async-routes",
method: "get",
response: () => {
return {
success: true,
data: [apiRouter]
};
}
}
]);