mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
fix menu click
This commit is contained in:
parent
62243ab38b
commit
ed1bb1b97b
@ -12,7 +12,8 @@ const AntMenu = React.createClass({
|
||||
onClick: noop,
|
||||
onOpen: noop,
|
||||
onClose: noop,
|
||||
theme: 'light' // or dark
|
||||
className: '',
|
||||
theme: 'light', // or dark
|
||||
};
|
||||
},
|
||||
getInitialState() {
|
||||
@ -58,12 +59,12 @@ const AntMenu = React.createClass({
|
||||
onClick: this.handleClick,
|
||||
onOpen: this.handleOpenKeys,
|
||||
onClose: this.handleCloseKeys,
|
||||
className: this.props.prefixCls + '-' + this.props.theme,
|
||||
};
|
||||
const className = this.props.className + ' ' + this.props.prefixCls + '-' + this.props.theme;
|
||||
if (this.props.mode === 'inline') {
|
||||
return <Menu {...this.props} {...props} openAnimation={openAnimation} />;
|
||||
return <Menu {...this.props} className={className} openAnimation={openAnimation} />;
|
||||
} else {
|
||||
return <Menu {...this.props} {...props} openTransitionName={openAnimation} />;
|
||||
return <Menu {...this.props} {...props} className={className} openTransitionName={openAnimation} />;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -32,15 +32,7 @@
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
&-inline > &-item-active,
|
||||
&-submenu-inline&-submenu-active,
|
||||
&-submenu-inline&-submenu-active > &-submenu-title:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
&-inline > &-item-active:hover,
|
||||
&-item-active,
|
||||
&-submenu-active,
|
||||
&-submenu-inline&-submenu-active > &-submenu-title:hover {
|
||||
background-color: tint(@primary-color, 90%);
|
||||
}
|
||||
@ -62,14 +54,17 @@
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.@{menu-prefix-cls}-item-selected {
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
&-inline {
|
||||
.@{menu-prefix-cls}-selected,
|
||||
.@{menu-prefix-cls}-item-active {
|
||||
border-right: 2px solid @primary-color;
|
||||
}
|
||||
|
||||
.@{menu-prefix-cls}-item-selected {
|
||||
background-color: tint(@primary-color, 90%);
|
||||
color: @primary-color;
|
||||
border-right: 2px solid @primary-color;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user