2020-05-29 00:33:49 +08:00
|
|
|
|
@namespace AntDesign
|
2020-07-30 23:54:31 +08:00
|
|
|
|
@inherits AntInputComponentBase<string[]>
|
2020-01-11 01:10:05 +08:00
|
|
|
|
|
2021-01-21 17:20:10 +08:00
|
|
|
|
<CascadingValue Value="this" IsFixed="@true">
|
2020-04-23 17:13:56 +08:00
|
|
|
|
<div class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
|
2021-04-25 01:04:21 +08:00
|
|
|
|
@if (MixedMode == CheckboxGroupMixedMode.ChildContentFirst)
|
|
|
|
|
@ChildContent
|
2020-07-30 23:54:31 +08:00
|
|
|
|
@if (Options.Value != null)
|
2020-04-23 17:13:56 +08:00
|
|
|
|
{
|
2020-07-30 23:54:31 +08:00
|
|
|
|
if (Options.IsT0)
|
2020-04-24 18:32:50 +08:00
|
|
|
|
{
|
2020-07-30 23:54:31 +08:00
|
|
|
|
@foreach (var option in Options.AsT0)
|
2020-08-31 23:41:33 +08:00
|
|
|
|
{
|
2020-07-30 23:54:31 +08:00
|
|
|
|
<Checkbox class="ant-checkbox-group-item"
|
|
|
|
|
Disabled="option.Disabled || Disabled"
|
2020-08-23 14:38:24 +08:00
|
|
|
|
Checked="@option.Checked"
|
2020-08-31 23:41:33 +08:00
|
|
|
|
Label="@option.Value">
|
2020-07-30 23:54:31 +08:00
|
|
|
|
<span>@option.Label</span>
|
|
|
|
|
</Checkbox>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@foreach (var option in Options.AsT1)
|
|
|
|
|
{
|
|
|
|
|
<Checkbox class="ant-checkbox-group-item"
|
|
|
|
|
Disabled="Disabled"
|
2020-08-01 23:45:48 +08:00
|
|
|
|
Checked="@option.IsIn(_selectedValues)"
|
2020-08-31 23:41:33 +08:00
|
|
|
|
Label="@option">
|
2020-07-30 23:54:31 +08:00
|
|
|
|
<span>@option</span>
|
|
|
|
|
</Checkbox>
|
|
|
|
|
}
|
2020-04-24 18:32:50 +08:00
|
|
|
|
}
|
2020-04-23 17:13:56 +08:00
|
|
|
|
}
|
2021-04-25 01:04:21 +08:00
|
|
|
|
@if (MixedMode == CheckboxGroupMixedMode.OptionsFirst)
|
|
|
|
|
@ChildContent
|
2020-04-23 17:13:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
</CascadingValue>
|