mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 17:31:42 +08:00
4d6c279e80
Co-authored-by: James Yeung <shunjiey@hotmail.com>
42 lines
1.3 KiB
C#
42 lines
1.3 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, OnBlur) },
|
|
{ "oninput", CallbackFactory.Create(this, OnInputAsync) },
|
|
{ "onkeypress", CallbackFactory.Create(this, OnPressEnterAsync) },
|
|
{ "onfocus", CallbackFactory.Create(this, OnFocus) },
|
|
{ "value", CurrentValueAsString },
|
|
{ "placeholder", Placeholder },
|
|
{ "id", Id },
|
|
{ "style", Style },
|
|
{ "class", ClassMapper.Class },
|
|
};
|
|
|
|
if (Attributes != null)
|
|
{
|
|
Attributes.Keys.ForEach(key => { attributes[key] = Attributes[key]; });
|
|
}
|
|
}
|
|
|
|
@if (Suffix != null)
|
|
{
|
|
<span class=@($"{PrefixCls}-affix-wrapper {PrefixCls}-affix-wrapper-textarea-with-clear-btn")>
|
|
<textarea @ref="Ref" @attributes="attributes" />
|
|
@Suffix
|
|
</span>
|
|
}
|
|
else
|
|
{
|
|
<textarea @ref="Ref" @attributes="attributes" />
|
|
}
|
|
|
|
@if (AutoSize)
|
|
{
|
|
<textarea class="@ClassMapper.Class" style="position:absolute;z-index:-1; visibility: hidden;height: 0px;overflow-y:hidden; @_hiddenWidth" @ref="_hiddenEle">@Value</textarea>
|
|
} |