2020-01-11 01:10:05 +08:00
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
|
|
|
|
namespace AntBlazor
|
|
|
|
|
{
|
|
|
|
|
public class AntCheckboxGroupBase : AntDomComponentBase
|
|
|
|
|
{
|
|
|
|
|
[Parameter]
|
|
|
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
|
|
|
|
|
|
public Action<object> onChange;
|
|
|
|
|
|
|
|
|
|
public Action onTouched;
|
|
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
|
public CheckBoxOption[] options { get; set; } = Array.Empty<CheckBoxOption>();
|
|
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
|
public bool disabled { get; set; }
|
|
|
|
|
|
|
|
|
|
public AntCheckboxGroupBase()
|
|
|
|
|
{
|
|
|
|
|
ClassMapper.Add("ant-checkbox-group");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onOptionChange()
|
|
|
|
|
{
|
2020-02-15 18:22:51 +08:00
|
|
|
|
this.onChange?.Invoke(this.options);
|
2020-01-11 01:10:05 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|