2020-05-29 00:33:49 +08:00
|
|
|
|
@namespace AntDesign
|
2020-06-27 01:20:52 +08:00
|
|
|
|
@inherits Input<string>
|
2020-03-23 09:31:08 +08:00
|
|
|
|
<!--TODO: minheight, maxheight, onResize-->
|
|
|
|
|
|
2020-07-07 12:44:10 +08:00
|
|
|
|
@{
|
|
|
|
|
Dictionary<string, object> attributes =
|
|
|
|
|
new Dictionary<string, object>()
|
|
|
|
|
{
|
|
|
|
|
{ "onchange", CallbackFactory.Create(this, OnChangeAsync) },
|
|
|
|
|
{ "onblur", CallbackFactory.Create(this, OnBlur) },
|
|
|
|
|
{ "oninput", CallbackFactory.Create(this, OnInputAsync) },
|
2020-07-30 09:06:56 +08:00
|
|
|
|
{ "onkeypress", CallbackFactory.Create(this, OnKeyPressAsync) },
|
|
|
|
|
{ "onkeyup", CallbackFactory.Create(this, OnKeyUpAsync) },
|
2020-07-07 12:44:10 +08:00
|
|
|
|
{ "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" />
|
|
|
|
|
}
|
2020-03-23 09:31:08 +08:00
|
|
|
|
|
2020-03-31 21:23:25 +08:00
|
|
|
|
@if (AutoSize)
|
|
|
|
|
{
|
|
|
|
|
<textarea class="@ClassMapper.Class" style="position:absolute;z-index:-1; visibility: hidden;height: 0px;overflow-y:hidden; @_hiddenWidth" @ref="_hiddenEle">@Value</textarea>
|
2020-07-07 12:44:10 +08:00
|
|
|
|
}
|