feat(module: layout): add DefaultCollapsed for sider (#3260)

This commit is contained in:
James Yeung 2023-05-13 12:57:49 +08:00 committed by GitHub
parent 08b162059f
commit f728324b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,9 @@ namespace AntDesign
[Parameter]
public EventCallback<bool> OnBreakpoint { get; set; }
[Parameter]
public bool DefaultCollapsed { get; set; }
[Inject]
private IDomEventListener DomEventListener { get; set; }
@ -103,6 +106,11 @@ namespace AntDesign
Trigger = DefaultTrigger;
}
if (DefaultCollapsed)
{
Collapsed = true;
}
SetClass();
}