偏右
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
6 additions and
8 deletions
-
components/menu/__tests__/__snapshots__/demo.test.js.snap
-
components/menu/demo/horizontal.md
-
components/menu/demo/theme.md
-
components/menu/style/dark.less
|
|
@ -1156,7 +1156,7 @@ Array [ |
|
|
|
Option 3 |
|
|
|
</li> |
|
|
|
<li |
|
|
|
class="ant-menu-item ant-menu-item-danger ant-menu-item-only-child" |
|
|
|
class="ant-menu-item ant-menu-item-only-child" |
|
|
|
role="menuitem" |
|
|
|
style="padding-left:48px" |
|
|
|
> |
|
|
|
|
|
@ -26,14 +26,13 @@ class App extends React.Component { |
|
|
|
|
|
|
|
handleClick = e => { |
|
|
|
console.log('click ', e); |
|
|
|
this.setState({ |
|
|
|
current: e.key, |
|
|
|
}); |
|
|
|
this.setState({ current: e.key }); |
|
|
|
}; |
|
|
|
|
|
|
|
render() { |
|
|
|
const { current } = this.state; |
|
|
|
return ( |
|
|
|
<Menu onClick={this.handleClick} selectedKeys={[this.state.current]} mode="horizontal"> |
|
|
|
<Menu onClick={this.handleClick} selectedKeys={[current]} mode="horizontal"> |
|
|
|
<Menu.Item key="mail" icon={<MailOutlined />}> |
|
|
|
Navigation One |
|
|
|
</Menu.Item> |
|
|
|
|
|
@ -61,9 +61,7 @@ class Sider extends React.Component { |
|
|
|
<Menu.Item key="1">Option 1</Menu.Item> |
|
|
|
<Menu.Item key="2">Option 2</Menu.Item> |
|
|
|
<Menu.Item key="3">Option 3</Menu.Item> |
|
|
|
<Menu.Item key="4" danger> |
|
|
|
Option 4 |
|
|
|
</Menu.Item> |
|
|
|
<Menu.Item key="4">Option 4</Menu.Item> |
|
|
|
</SubMenu> |
|
|
|
<SubMenu key="sub2" icon={<AppstoreOutlined />} title="Navigation Two"> |
|
|
|
<Menu.Item key="5">Option 5</Menu.Item> |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
.@{menu-prefix-cls} { |
|
|
|
// dark theme |
|
|
|
&&-dark, |
|
|
|
&-dark &-sub, |
|
|
|
&&-dark &-sub { |
|
|
|
color: @menu-dark-color; |
|
|
|
background: @menu-dark-bg; |
|
|
|