Skip to content

Commit

Permalink
Merge 882f10a into 3e981dd
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Hon authored Feb 20, 2021
2 parents 3e981dd + 882f10a commit d405547
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/components/menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
} as Meta;

export const Vertical: Story<IMenuProps & ISubMenuProps & IMenuItemProps> = (args) => {
const { disabled, inlineCollapsed, title } = args;
const { disabled, inlineCollapsed, title, expandIcon } = args;
const [selectedKey, setSelectedKey] = useState('sub-menu-1-1');
const handleClick = (e: any) => {
setSelectedKey(e.key);
Expand All @@ -35,7 +35,7 @@ export const Vertical: Story<IMenuProps & ISubMenuProps & IMenuItemProps> = (arg
onClick={handleClick}
defaultOpenKeys={['sub-1']}
>
<SubMenu disabled={disabled} key="sub-1" title="功能名称-1" icon={<AppOutlined />}>
<SubMenu disabled={disabled} key="sub-1" title="功能名称-1" icon={<AppOutlined />} expandIcon={expandIcon}>
<MenuItem key="sub-menu-1-1">功能名称-1-1</MenuItem>
<MenuItem key="sub-menu-1-2">功能名称-1-2</MenuItem>
</SubMenu>
Expand All @@ -60,9 +60,10 @@ export const Vertical: Story<IMenuProps & ISubMenuProps & IMenuItemProps> = (arg
};

Vertical.args = {
disabled: false,
disabled: true,
inlineCollapsed: false,
title: '标题',
expandIcon: () => null,
};

export const Horizontal: Story<IMenuProps & ISubMenuProps & IMenuItemProps> = (args) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/menu/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
font-weight: @weight-font-medium;
font-size: 12px;
line-height: 20px;
background-color: #f7f8fc;
}

.@{menu-icon-cls} {
Expand Down
1 change: 0 additions & 1 deletion src/components/menu/style/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
&-vertical {
width: 100%;
font-size: @size-font-14;
background-color: #f7f8fc;
transition: width 0.2s;
&:not(.@{menu-prefix-cls}-sub) > *:first-child {
margin-top: 0 !important;
Expand Down

0 comments on commit d405547

Please sign in to comment.