--- order: 5 title: zh-CN: 切换菜单类型 en-US: Switch the menu type --- ## zh-CN 展示动态切换模式。 ## en-US Show the dynamic switching mode (between 'inline' and 'vertical'). ````jsx import { Menu, Icon, Switch } from 'antd'; const SubMenu = Menu.SubMenu; const MenuItemGroup = Menu.ItemGroup; const Sider = React.createClass({ getInitialState() { return { mode: 'inline', }; }, changeMode(value) { this.setState({ mode: value ? 'vertical' : 'inline', }); }, render() { return (


导航一}> 选项1 选项2 选项3 选项4 导航二}> 选项5 选项6 选项7 选项8 导航三}> 选项9 选项10 选项11 选项12
); }, }); ReactDOM.render(, mountNode); ````