2020-04-23 17:13:56 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
2020-03-23 09:31:08 +08:00
|
|
|
|
|
2020-05-29 00:33:49 +08:00
|
|
|
|
namespace AntDesign
|
2020-03-23 09:31:08 +08:00
|
|
|
|
{
|
2020-05-20 12:57:16 +08:00
|
|
|
|
public partial class InputGroup : AntDomComponentBase
|
2020-03-23 09:31:08 +08:00
|
|
|
|
{
|
|
|
|
|
protected const string PrefixCls = "ant-input-group";
|
|
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
|
|
|
|
|
|
[Parameter]
|
2020-05-29 12:55:15 +08:00
|
|
|
|
public bool Compact { get; set; }
|
2020-04-23 17:13:56 +08:00
|
|
|
|
|
2020-05-29 12:55:15 +08:00
|
|
|
|
[Parameter]
|
|
|
|
|
public string Size { get; set; }
|
2020-03-23 09:31:08 +08:00
|
|
|
|
|
|
|
|
|
protected override void OnInitialized()
|
|
|
|
|
{
|
|
|
|
|
base.OnInitialized();
|
|
|
|
|
|
|
|
|
|
ClassMapper.Clear()
|
|
|
|
|
.Add(PrefixCls)
|
2020-05-20 12:57:16 +08:00
|
|
|
|
.If($"{PrefixCls}-lg", () => Size == InputSize.Large)
|
|
|
|
|
.If($"{PrefixCls}-sm", () => Size == InputSize.Small)
|
2020-05-29 12:55:15 +08:00
|
|
|
|
.If($"{PrefixCls}-compact", () => Compact);
|
2020-03-23 09:31:08 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|