umijs / plugins

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

关于plugin-layout 路由权限的bug问题 #845

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

是其他问题