--- 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, Button } from 'antd'; import { AppstoreOutlined, MenuUnfoldOutlined, MenuFoldOutlined, PieChartOutlined, DesktopOutlined, InboxOutlined, MailOutlined, } from '@ant-design/icons'; const { SubMenu } = Menu; 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); ```