权限重构
This commit is contained in:
@ -10,6 +10,7 @@ import ParentView from '@/components/ParentView/index.vue';
|
||||
import InnerLink from '@/layout/components/InnerLink/index.vue';
|
||||
|
||||
import { createCustomNameComponent } from '@/utils/createCustomNameComponent';
|
||||
import { useUserStoreHook } from './user';
|
||||
|
||||
// 匹配views里面所有的.vue文件
|
||||
const modules = import.meta.glob('./../../views/**/*.vue');
|
||||
@ -44,7 +45,7 @@ export const usePermissionStore = defineStore('permission', () => {
|
||||
sidebarRouters.value = routes;
|
||||
};
|
||||
const generateRoutes = async (): Promise<RouteRecordRaw[]> => {
|
||||
const res = await getRouters();
|
||||
const res = await getRouters(useUserStoreHook().selectedProject?.id || '0');
|
||||
const { data } = res;
|
||||
const sdata = JSON.parse(JSON.stringify(data));
|
||||
const rdata = JSON.parse(JSON.stringify(data));
|
||||
|
Reference in New Issue
Block a user