--- order: 2 title: zh-CN: 缩起内嵌菜单 en-US: Collapsed inline menu --- ## zh-CN 内嵌菜单可以被缩起/展开。 ## en-US Inline menu could be collapsed. ````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); ````