--- order: 2 title: zh-CN: 缩起内嵌菜单 en-US: Collapsed inline menu --- ## zh-CN 内嵌菜单可以被缩起/展开。 你可以在 [Layout](/components/layout/#components-layout-demo-side) 里查看侧边布局结合的完整示例。 ## en-US Inline menu could be collapsed. Here is [a complete demo](/components/layout/#components-layout-demo-side) with sider layout. ````jsx import { Menu, Icon, Button } from 'antd'; const SubMenu = Menu.SubMenu; class App extends React.Component { state = { collapsed: false, } toggleCollapsed = () => { this.setState({ collapsed: !this.state.collapsed, }); } render() { return (
Option 1 Option 2 Option 3 Navigation One}> Option 5 Option 6 Option 7 Option 8 Navigation Two}> Option 9 Option 10 Option 11 Option 12
); } } ReactDOM.render(, mountNode); ````