--- order: 5 title: 切换菜单类型 --- 展示动态切换模式。 ````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 (