mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
9c98b27e3b
* add input component * fix menu
27 lines
764 B
C#
27 lines
764 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AntBlazor
|
|
{
|
|
public partial class AntInputGroup : AntDomComponentBase
|
|
{
|
|
protected const string PrefixCls = "ant-input-group";
|
|
|
|
[Parameter]
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
[Parameter]
|
|
public string size { get; set; }
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
|
|
ClassMapper.Clear()
|
|
.Add(PrefixCls)
|
|
.If($"{PrefixCls}-lg", () => size == AntInputSize.Large)
|
|
.If($"{PrefixCls}-sm", () => size == AntInputSize.Small)
|
|
.If($"{PrefixCls}-compact", () => Attributes != null && Attributes.ContainsKey("compact"));
|
|
}
|
|
}
|
|
}
|