umijs / plugins

🍣 The one-stop shop for official Umi plugins and presets.
348 stars 238 forks source link

pro-layout 路由的access不生效的问题 #844

Closed yuankeyan closed 2 years ago

yuankeyan commented 2 years ago

@umijs/preset-react": "^2.1.3“版本中,在plugin-layout/layout/layout/index.tsx中 const currentPathConfig = useMemo(() => { const { menuData } = transformRoute( props?.route?.routes || [], undefined, undefined, true, ); // 动态路由匹配 const currentPathConfig = getMatchMenu(location.pathname, menuData).pop(); return currentPathConfig || {}; },[location?.pathname, props?.route?.routes]);

currentPathConfig是当前的路由,没有经过traverseModifyRoutes转化,此时currentPathConfig.unAccessible || currentPathConfig.unaccessible是没有值的,WithExceptionOpChildren使用时,不能很好的进行权限控制,这个是不是bug?

yuankeyan commented 2 years ago

是其他问题