fix 自定义路由配置

This commit is contained in:
Ironsp
2026-05-12 09:37:18 +08:00
parent df90aefad6
commit 4c66f630a9
12 changed files with 177 additions and 3 deletions

View File

@@ -45,6 +45,10 @@ export const usePermissionStore = defineStore('permission', () => {
const setSidebarRouters = (routes: RouteRecordRaw[]): void => {
sidebarRouters.value = routes;
};
/**
* 生成路由
* @returns 路由数组
*/
const generateRoutes = async (): Promise<RouteRecordRaw[]> => {
const res = await getRouters();
const { data } = res;