mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 17:01:18 +08:00
2d693740c6
* docs(module:input): api correction & comments * fix(module:input): clear icon in sync with antD * fix(module:input): add parameter bordered * fix(module:textarea): add parameter ShowCounter * fix(module:input): Focus with behaviors * docs: add missing docs, rearrange order * fix(module:search): update to match new standard look doc(module:search): add API & demos * fix(module:inputgroup): override style to remove whitespace\ docs: same as react * fix(module:inputpassword): support custom icon docs: same as react * fix(module:input): add blur method docs: add blur method * fix(module:input): add readonly parameter * tests * fix * fix(module:input): sequence correction * Update components/core/Base/AntComponentBase.cs Co-authored-by: James Yeung <shunjiey@hotmail.com> * review fixes * fix: clean-up * tests: fix missing mock * fix: focus * fix(module:input): bind clear button to _inputValue * tests: clear button show/hide * tests: package update Co-authored-by: James Yeung <shunjiey@hotmail.com>
62 lines
1.8 KiB
C#
62 lines
1.8 KiB
C#
@namespace AntDesign
|
|
@inherits Input<string>
|
|
<!--TODO: minheight, maxheight, onResize-->
|
|
|
|
@{
|
|
Dictionary<string, object> attributes =
|
|
new Dictionary<string, object>()
|
|
{
|
|
{ "onchange", CallbackFactory.Create(this, OnChangeAsync) },
|
|
{ "onblur", CallbackFactory.Create(this, OnBlurAsync) },
|
|
{ "oninput", CallbackFactory.Create(this, OnInputAsync) },
|
|
{ "onkeypress", CallbackFactory.Create(this, OnKeyPressAsync) },
|
|
{ "onkeyup", CallbackFactory.Create(this, OnKeyUpAsync) },
|
|
{ "onkeydown", CallbackFactory.Create(this, OnkeyDownAsync) },
|
|
{ "onfocus", CallbackFactory.Create(this, OnFocusAsync) },
|
|
{ "value", CurrentValueAsString },
|
|
{ "placeholder", Placeholder },
|
|
{ "id", Id },
|
|
{ "style", Style },
|
|
{ "class", ClassMapper.Class },
|
|
{ "disabled", Disabled },
|
|
{ "readonly", ReadOnly },
|
|
};
|
|
|
|
if (Attributes != null)
|
|
{
|
|
Attributes.Keys.ForEach(key => { attributes[key] = Attributes[key]; });
|
|
}
|
|
}
|
|
|
|
@if (ShowCount)
|
|
{
|
|
<div class="ant-input=textarea ant-input-textarea-show-count" data-count="@(Value?.Length ?? 0)">
|
|
@if (Suffix != null)
|
|
{
|
|
<span class="@_warpperClassMapper.Class">
|
|
<textarea @ref="Ref" @attributes="attributes"/>
|
|
@Suffix
|
|
</span>
|
|
}
|
|
else
|
|
{
|
|
<textarea @ref="Ref" @attributes="attributes"/>
|
|
}
|
|
<AntDesign.Text Style="float: right; pointer-events: none; white-space: nowrap; color: rgba(0, 0, 0, 0.45)"> @($"/ {MaxLength}")</AntDesign.Text>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
@if (Suffix != null)
|
|
{
|
|
<span class="@_warpperClassMapper.Class">
|
|
<textarea @ref="Ref" @attributes="attributes"/>
|
|
@Suffix
|
|
</span>
|
|
}
|
|
else
|
|
{
|
|
<textarea @ref="Ref" @attributes="attributes"/>
|
|
}
|
|
}
|