Commit 910e884f authored by wuhao's avatar wuhao 🎯

asder

parent 670536e9
...@@ -51,10 +51,16 @@ const mapTree = (org) => { ...@@ -51,10 +51,16 @@ const mapTree = (org) => {
}; };
const MenuRender = ({ arrs, mode, activeKey }) => { const MenuRender = ({ arrs, mode, activeKey }) => {
const curactive = activeKey
? activeKey
?.split('/')
?.filter((it, i) => i < 2)
?.join('/')
: '/home';
return ( return (
<Menu <Menu
mode={mode ?? 'horizontal'} mode={mode ?? 'horizontal'}
activeKey={activeKey} activeKey={curactive}
items={arrs} items={arrs}
onClick={({ items, key, keyPath, domEvent }) => { onClick={({ items, key, keyPath, domEvent }) => {
if (key.includes('http')) { if (key.includes('http')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment