Commit 6ea21d40 by maolipeng

fix:菜单优化。。。。

parent 44fa3846
...@@ -58,7 +58,7 @@ function Aside(props: any) { ...@@ -58,7 +58,7 @@ function Aside(props: any) {
setOpenKeys([]) setOpenKeys([])
} }
} }
function onOpenChange(key: Key[]) { function onOpenChange(key: any) {
if (typeof key === "string") { if (typeof key === "string") {
if (openKeys.includes(key)) { if (openKeys.includes(key)) {
setOpenKeys([]); setOpenKeys([]);
...@@ -122,7 +122,7 @@ function Aside(props: any) { ...@@ -122,7 +122,7 @@ function Aside(props: any) {
<Menu <Menu
style={menuType ? { minHeight: "100%", background: '#0E1935' }:{minHeight: "100%", background: '#0E1935',width:"56px" }} style={menuType ? { minHeight: "100%", background: '#0E1935' }:{minHeight: "100%", background: '#0E1935',width:"56px" }}
selectedKeys={selectKey} selectedKeys={selectKey}
openKeys={menuType ? openKeys : []} openKeys={menuType ? openKeys : undefined}
onOpenChange={onOpenChange} onOpenChange={onOpenChange}
inlineCollapsed={collapsed} inlineCollapsed={collapsed}
mode={menuType ? "inline" : "vertical"} mode={menuType ? "inline" : "vertical"}
......
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