Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[功能]: 当路由父级的子项被动态过滤为空时,父级支持自动隐藏 #621

Closed
NHZEX opened this issue Sep 11, 2024 · 2 comments · Fixed by #626
Closed

[功能]: 当路由父级的子项被动态过滤为空时,父级支持自动隐藏 #621

NHZEX opened this issue Sep 11, 2024 · 2 comments · Fixed by #626
Labels
bug Something isn't working

Comments

@NHZEX
Copy link
Contributor

NHZEX commented Sep 11, 2024

描述

图中为为系统管理的子级都被被权限过滤为空,且父级没有声明任何权限控制
image

给父级去定定义权限可以解决,但如果每个子机的权限都需要同时在父级声明维护这个操作不友好,容易发生错漏。

建议的解决方案

当权限路由声明了children且同时为空数组时,无论父级是否有权限都会被自动被过滤

替代方案

No response

额外的上下文

No response

@Azir-11 Azir-11 added the bug Something isn't working label Sep 11, 2024
@mufeng889
Copy link
Member

这个我觉的不是前端的事情 ,应该是后端没有处理好 ,在动态添加路由的时候还是会被添加上 ,前端总不可能判断是否有children从而决定要不要把这个路由添加上吧,就算在侧边栏被过滤了 路由依然存在 这并不能算是前端的问题吧

@Azir-11
Copy link
Member

Azir-11 commented Sep 12, 2024

这个我觉的不是前端的事情 ,应该是后端没有处理好 ,在动态添加路由的时候还是会被添加上 ,前端总不可能判断是否有children从而决定要不要把这个路由添加上吧,就算在侧边栏被过滤了 路由依然存在 这并不能算是前端的问题吧

roles过滤是纯前端的,不涉及动态路由

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants