mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-04 13:08:23 +08:00
feat(module:menu): Add PopupClassName Property For SubMenu (#3027)
Co-authored-by: JustGentle <justgentle@sina.com>
This commit is contained in:
parent
789d315ad7
commit
bec3f840d2
@ -47,6 +47,7 @@ else if (RootMenu.InlineCollapsed || RootMenu.InternalMode == MenuMode.Horizonta
|
||||
OnVisibleChange="OnOverlayVisibleChange"
|
||||
OnOverlayHiding="OnOverlayHiding"
|
||||
Trigger="new Trigger[] { RootMenu?.TriggerSubMenuAction ?? AntDesign.Trigger.Hover }"
|
||||
OverlayClassName="@PopupClassName"
|
||||
PlacementCls="@($"{prefixCls}-popup {RootMenu.PrefixCls} {RootMenu.PrefixCls}-{RootMenu.Theme} {prefixCls}-placement-{_placement.Name}")">
|
||||
<ChildContent>
|
||||
<div class="@(prefixCls)-title" role="button">
|
||||
@ -78,7 +79,7 @@ else if (RootMenu.InlineCollapsed || RootMenu.InternalMode == MenuMode.Horizonta
|
||||
@code
|
||||
{
|
||||
private RenderFragment GetArrow()
|
||||
{
|
||||
{
|
||||
string prefixCls = $"{RootMenu.PrefixCls}-submenu";
|
||||
if (RootMenu.PrefixCls.Contains("dropdown"))
|
||||
{
|
||||
@ -92,8 +93,8 @@ else if (RootMenu.InlineCollapsed || RootMenu.InternalMode == MenuMode.Horizonta
|
||||
}
|
||||
else if (Parent is AntDesign.SubMenu || RootMenu.Mode == MenuMode.Vertical)
|
||||
{
|
||||
return @<i class="@(prefixCls)-arrow"></i>;
|
||||
}
|
||||
return @<i class="@(prefixCls)-arrow"></i>;
|
||||
}
|
||||
return default;
|
||||
}
|
||||
}
|
@ -32,6 +32,9 @@ namespace AntDesign
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string PopupClassName { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string Title { get; set; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user