Class BootstrapInputNumber<TValue>
- Namespace
- BootstrapBlazor.Components
- Assembly
- BootstrapBlazor.dll
An input component for editing numeric values. Supported numeric types are int, long, short, float, double, decimal.
public class BootstrapInputNumber<TValue> : BootstrapInputNumberBase<TValue>, IComponent, IHandleAfterRender, IHandleEvent, IAsyncDisposable, IValidateComponent
Type Parameters
TValue
- Inheritance
-
DisplayBase<TValue>ValidateBase<TValue>BootstrapInputBase<TValue>BootstrapInputEventBase<TValue>BootstrapInputNumberBase<TValue>BootstrapInputNumber<TValue>
- Implements
- Inherited Members
- Extension Methods
Constructors
BootstrapInputNumber()
public BootstrapInputNumber()
Properties
ButtonClassString
获得 按钮样式
protected string? ButtonClassString { get; }
Property Value
InputClassString
获得 文本框样式
protected string? InputClassString { get; }
Property Value
Max
获得/设置 最大值
[Parameter]
public string? Max { get; set; }
Property Value
Min
获得/设置 最小值
[Parameter]
public string? Min { get; set; }
Property Value
MinusIcon
获得/设置 减小数值图标
[Parameter]
public string? MinusIcon { get; set; }
Property Value
OnDecrement
获得/设置 数值减少时回调委托
[Parameter]
public Func<TValue, Task>? OnDecrement { get; set; }
Property Value
OnIncrement
获得/设置 数值增加时回调委托
[Parameter]
public Func<TValue, Task>? OnIncrement { get; set; }
Property Value
PlusIcon
获得/设置 增加数值图标
[Parameter]
public string? PlusIcon { get; set; }
Property Value
ShowButton
获得/设置 是否显示加减按钮
[Parameter]
public bool ShowButton { get; set; }
Property Value
Step
获得/设置 步长 默认为 null
[Parameter]
public string? Step { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
FormatParsingErrorMessage()
protected override string? FormatParsingErrorMessage()
Returns
FormatValueAsString(TValue)
Formats the value as a string. Derived classes can override this to determine the formatting used for CurrentValueAsString.
protected override string? FormatValueAsString(TValue value)
Parameters
value
TValueThe value to format.
Returns
- string
A string representation of the value.
InternalFormat(TValue)
InternalFormat 方法
protected virtual string? InternalFormat(TValue value)
Parameters
value
TValue
Returns
Exceptions
OnAfterRender(bool)
protected override void OnAfterRender(bool firstRender)
Parameters
firstRender
bool
OnInitialized()
OnInitialized 方法
protected override void OnInitialized()
OnParametersSet()
OnParametersSet 方法
protected override void OnParametersSet()
TryParseValueFromString(string, out TValue, out string?)
TryParseValueFromString
protected override bool TryParseValueFromString(string value, out TValue result, out string? validationErrorMessage)