AntInputComponentBase<T>
Input的基类,例如InputNumber,Input 是继承自这个
razor 继承
@inherits AntInputComponentBase<string>
Value、CurrentValue、CurrentValueAsString 的作用
Value :用于外层的值绑定,有就是常用的 @bind-Value="@context.Name"
CurrentValue:用于子类操作,这个是TValue类型,例如上传后得到一个值,那么可以传入CurrentValue,会同时更新Value,CurrentValueAsString
CurrentValueAsString:用于内层的值绑定
<InputGroup Compact>
    <Input @bind-Value="@CurrentValueAsString" />
    <Popover Placement="Placement.TopLeft" Disabled="@(string.IsNullOrEmpty(CurrentValueAsString))" >
        <ContentTemplate>
            <div>
                <img src="@CurrentValueAsString" style="max-width:150px; max-height:100px;" />
            </div>
        </ContentTemplate>
        <ChildContent>
            <Button Icon="eye"></Button>
        </ChildContent>
    </Popover>
</InputGroup>
关于FormItem的Label以及数据验证怎么根据model属性的特性来自动实现
在子控件中,记得调用 base.OnInitialized();
protected override void OnInitialized()
{
    base.OnInitialized();
    Data = new Dictionary<string, object>()
    {
        { "CommunityFlag",CommunityFlag},
        { "AppFlag",AppFlag}
    };
}
 站点公众号
                站点公众号