--- order: 4 title: zh-CN: 主题 en-US: Menu Themes --- ## zh-CN 内建了两套主题 `light` 和 `dark`,默认 `light`。 ## en-US There are two built-in themes: `light` and `dark`. The default value is `light`. ```jsx import { Menu, Switch } from 'antd'; import { MailOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons'; const { SubMenu } = Menu; class Sider extends React.Component { state = { theme: 'dark', current: '1', }; changeTheme = value => { this.setState({ theme: value ? 'dark' : 'light', }); }; handleClick = e => { console.log('click ', e); this.setState({ current: e.key, }); }; render() { return ( <>

} title="Navigation One"> Option 1 Option 2 Option 3 Option 4 } title="Navigation Two"> Option 5 Option 6 Option 7 Option 8 } title="Navigation Three"> Option 9 Option 10 Option 11 Option 12 ); } } ReactDOM.render(, mountNode); ```