mirror of
https://github.com/PlayEdu/backend
synced 2025-06-09 16:44:08 +08:00
左侧菜单优化
This commit is contained in:
parent
0e6435a472
commit
bc33b7c34f
@ -68,6 +68,9 @@ const items = [
|
||||
),
|
||||
];
|
||||
|
||||
export const LeftMenu: React.FC = () => {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
const children2Parent: any = {
|
||||
"^/video": ["resource"],
|
||||
"^/image": ["resource"],
|
||||
@ -77,10 +80,6 @@ const children2Parent: any = {
|
||||
"^/system": ["system"],
|
||||
};
|
||||
|
||||
export const LeftMenu: React.FC = () => {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const hit = (pathname: string): string[] => {
|
||||
for (let p in children2Parent) {
|
||||
if (pathname.search(p) >= 0) {
|
||||
@ -104,7 +103,6 @@ export const LeftMenu: React.FC = () => {
|
||||
}
|
||||
newOpenKeys.push(openKeys[i]);
|
||||
}
|
||||
|
||||
return newOpenKeys;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user