mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-02 12:07:44 +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))
|
@if (!string.IsNullOrEmpty(Label))
|
||||||
{
|
{
|
||||||
<AntDesign.Col @attributes="GetLabelColAttributes()" class=@($"{_prefixCls}-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>
|
||||||
}
|
}
|
||||||
<AntDesign.Col @attributes="GetWrapperColAttributes()" class=@($"{_prefixCls}-control")>
|
<AntDesign.Col @attributes="GetWrapperColAttributes()" class=@($"{_prefixCls}-control")>
|
||||||
|
@ -39,6 +39,9 @@ namespace AntDesign
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public bool NoStyle { get; set; } = false;
|
public bool NoStyle { get; set; } = false;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public bool Required { get; set; } = false;
|
||||||
|
|
||||||
private EditContext EditContext => Form?.EditContext;
|
private EditContext EditContext => Form?.EditContext;
|
||||||
|
|
||||||
private bool _isValid = true;
|
private bool _isValid = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user