mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
fix: menu grp item style missing (#38525)
This commit is contained in:
parent
99d281082d
commit
38d75cf346
@ -1482,6 +1482,88 @@ Array [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item-group"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-menu-item-group-title"
|
||||||
|
title="Group"
|
||||||
|
>
|
||||||
|
Group
|
||||||
|
</div>
|
||||||
|
<ul
|
||||||
|
class="ant-menu-item-group-list"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
style="padding-left:24px"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 13
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
style="padding-left:24px"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 14
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>,
|
</ul>,
|
||||||
<div
|
<div
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
@ -1751,6 +1833,50 @@ Array [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>,
|
</div>,
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -512,6 +512,44 @@ Array [
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item-group"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-menu-item-group-title"
|
||||||
|
title="Group"
|
||||||
|
>
|
||||||
|
Group
|
||||||
|
</div>
|
||||||
|
<ul
|
||||||
|
class="ant-menu-item-group-list"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
style="padding-left:24px"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 13
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
style="padding-left:24px"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 14
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>,
|
</ul>,
|
||||||
<div
|
<div
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -39,6 +39,8 @@ const items: MenuProps['items'] = [
|
|||||||
getItem('Option 11', '11'),
|
getItem('Option 11', '11'),
|
||||||
getItem('Option 12', '12'),
|
getItem('Option 12', '12'),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
getItem('Group', 'grp', null, [getItem('Option 13', '13'), getItem('Option 14', '14')], 'group'),
|
||||||
];
|
];
|
||||||
|
|
||||||
const App: React.FC = () => {
|
const App: React.FC = () => {
|
||||||
|
@ -70,6 +70,13 @@ const getVerticalStyle: GenerateStyle<MenuToken> = token => {
|
|||||||
boxShadowSecondary,
|
boxShadowSecondary,
|
||||||
} = token;
|
} = token;
|
||||||
|
|
||||||
|
const inlineItemStyle: CSSObject = {
|
||||||
|
height: menuItemHeight,
|
||||||
|
lineHeight: `${menuItemHeight}px`,
|
||||||
|
listStylePosition: 'inside',
|
||||||
|
listStyleType: 'disc',
|
||||||
|
};
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
[componentCls]: {
|
[componentCls]: {
|
||||||
@ -144,18 +151,15 @@ const getVerticalStyle: GenerateStyle<MenuToken> = token => {
|
|||||||
borderRadius: 0,
|
borderRadius: 0,
|
||||||
boxShadow: 'none',
|
boxShadow: 'none',
|
||||||
|
|
||||||
[`& > ${componentCls}-item,
|
[`& > ${componentCls}-submenu > ${componentCls}-submenu-title`]: inlineItemStyle,
|
||||||
& > ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
|
|
||||||
height: menuItemHeight,
|
|
||||||
lineHeight: `${menuItemHeight}px`,
|
|
||||||
listStylePosition: 'inside',
|
|
||||||
listStyleType: 'disc',
|
|
||||||
},
|
|
||||||
|
|
||||||
[`& ${componentCls}-item-group-title`]: {
|
[`& ${componentCls}-item-group-title`]: {
|
||||||
paddingInlineStart: paddingXL,
|
paddingInlineStart: paddingXL,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// >>>>> Item
|
||||||
|
[`${componentCls}-item`]: inlineItemStyle,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user