mirror of
https://github.com/PlayEdu/backend
synced 2025-06-22 22:12:45 +08:00
线上课学员、学员学习学习进度左侧菜单高亮
This commit is contained in:
parent
a34a2ccae8
commit
71c0f03be4
@ -119,8 +119,16 @@ export const LeftMenu: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (location.pathname.indexOf("/course/user") !== -1) {
|
||||||
|
setSelectedKeys(["/course"]);
|
||||||
|
setOpenKeys(openKeyMerge("/course"));
|
||||||
|
} else if (location.pathname.indexOf("/member/learn") !== -1) {
|
||||||
|
setSelectedKeys(["/member/index"]);
|
||||||
|
setOpenKeys(openKeyMerge("/member/index"));
|
||||||
|
} else {
|
||||||
setSelectedKeys([location.pathname]);
|
setSelectedKeys([location.pathname]);
|
||||||
setOpenKeys(openKeyMerge(location.pathname));
|
setOpenKeys(openKeyMerge(location.pathname));
|
||||||
|
}
|
||||||
}, [location.pathname]);
|
}, [location.pathname]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user