偏右
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 |
|
|
Option 3 |
|
|
</li> |
|
|
</li> |
|
|
<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" |
|
|
role="menuitem" |
|
|
style="padding-left:48px" |
|
|
style="padding-left:48px" |
|
|
> |
|
|
> |
|
|
|
@ -26,14 +26,13 @@ class App extends React.Component { |
|
|
|
|
|
|
|
|
handleClick = e => { |
|
|
handleClick = e => { |
|
|
console.log('click ', e); |
|
|
console.log('click ', e); |
|
|
this.setState({ |
|
|
this.setState({ current: e.key }); |
|
|
current: e.key, |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
render() { |
|
|
render() { |
|
|
|
|
|
const { current } = this.state; |
|
|
return ( |
|
|
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 />}> |
|
|
<Menu.Item key="mail" icon={<MailOutlined />}> |
|
|
Navigation One |
|
|
Navigation One |
|
|
</Menu.Item> |
|
|
</Menu.Item> |
|
|
|
@ -61,9 +61,7 @@ class Sider extends React.Component { |
|
|
<Menu.Item key="1">Option 1</Menu.Item> |
|
|
<Menu.Item key="1">Option 1</Menu.Item> |
|
|
<Menu.Item key="2">Option 2</Menu.Item> |
|
|
<Menu.Item key="2">Option 2</Menu.Item> |
|
|
<Menu.Item key="3">Option 3</Menu.Item> |
|
|
<Menu.Item key="3">Option 3</Menu.Item> |
|
|
<Menu.Item key="4" danger> |
|
|
<Menu.Item key="4">Option 4</Menu.Item> |
|
|
Option 4 |
|
|
|
|
|
</Menu.Item> |
|
|
|
|
|
</SubMenu> |
|
|
</SubMenu> |
|
|
<SubMenu key="sub2" icon={<AppstoreOutlined />} title="Navigation Two"> |
|
|
<SubMenu key="sub2" icon={<AppstoreOutlined />} title="Navigation Two"> |
|
|
<Menu.Item key="5">Option 5</Menu.Item> |
|
|
<Menu.Item key="5">Option 5</Menu.Item> |
|
|
|
@ -1,6 +1,7 @@ |
|
|
.@{menu-prefix-cls} { |
|
|
.@{menu-prefix-cls} { |
|
|
// dark theme |
|
|
// dark theme |
|
|
&&-dark, |
|
|
&&-dark, |
|
|
|
|
|
&-dark &-sub, |
|
|
&&-dark &-sub { |
|
|
&&-dark &-sub { |
|
|
color: @menu-dark-color; |
|
|
color: @menu-dark-color; |
|
|
background: @menu-dark-bg; |
|
|
background: @menu-dark-bg; |
|
|