mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-11-30 11:08:14 +08:00
feat(module: form): add Required paramater (#353)
This commit is contained in:
parent
0da743fab2
commit
503415ea07
@ -6,7 +6,7 @@
|
||||
@if (!string.IsNullOrEmpty(Label))
|
||||
{
|
||||
<AntDesign.Col @attributes="GetLabelColAttributes()" class=@($"{_prefixCls}-label")>
|
||||
<label class=@(_labelCls)> @(Label)</label>
|
||||
<label class=@(Required ? $"{_prefixCls}-required" : _labelCls)> @(Label)</label>
|
||||
</AntDesign.Col>
|
||||
}
|
||||
<AntDesign.Col @attributes="GetWrapperColAttributes()" class=@($"{_prefixCls}-control")>
|
||||
|
@ -39,6 +39,9 @@ namespace AntDesign
|
||||
[Parameter]
|
||||
public bool NoStyle { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public bool Required { get; set; } = false;
|
||||
|
||||
private EditContext EditContext => Form?.EditContext;
|
||||
|
||||
private bool _isValid = true;
|
||||
|
Loading…
Reference in New Issue
Block a user