2020-07-11 01:46:35 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@using AntDesign.Internal
|
|
|
|
|
@inherits AntDomComponentBase
|
2022-11-13 13:57:41 +08:00
|
|
|
|
<CascadingValue Value='$"ant-mentions-dropdown"' Name="PrefixCls" IsFixed>
|
|
|
|
|
<OverlayTrigger @ref="_overlayTrigger"
|
|
|
|
|
Trigger="new[] { Trigger.None }"
|
|
|
|
|
OverlayLeaveCls=""
|
|
|
|
|
OverlayEnterCls=""
|
|
|
|
|
HiddenMode=true
|
|
|
|
|
InlineFlexMode=false>
|
|
|
|
|
<Overlay>
|
|
|
|
|
<CascadingValue Value=this>
|
|
|
|
|
@if (OriginalOptions.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
<ul class="ant-mentions-dropdown-menu ant-mentions-dropdown-menu-root ant-mentions-dropdown-menu-vertical">
|
|
|
|
|
@foreach (var item in ShowOptions)
|
|
|
|
|
{
|
|
|
|
|
<MentionsOption Value="@item.Value">@item.ChildContent</MentionsOption>
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@ChildContent
|
|
|
|
|
}
|
|
|
|
|
</CascadingValue>
|
|
|
|
|
</Overlay>
|
2020-07-11 01:46:35 +08:00
|
|
|
|
|
2022-11-13 13:57:41 +08:00
|
|
|
|
<Unbound>
|
2023-04-08 14:23:20 +08:00
|
|
|
|
<div class="@ClassMapper.Class">
|
|
|
|
|
@if (TextareaTemplate == null)
|
|
|
|
|
{
|
|
|
|
|
<textarea value="@Value"
|
2022-11-13 13:57:41 +08:00
|
|
|
|
@ref="context.Current"
|
|
|
|
|
@attributes="@Attributes"
|
|
|
|
|
@onkeydown="OnKeyDown"
|
2023-04-08 14:23:20 +08:00
|
|
|
|
@oninput="OnInput"
|
|
|
|
|
style="@Style"
|
2022-11-13 13:57:41 +08:00
|
|
|
|
class="rc-textarea"
|
|
|
|
|
placeholder="@Placeholder"
|
2023-04-08 14:23:20 +08:00
|
|
|
|
rows="@Rows" />
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@TextareaTemplate(new MentionsTextareaTemplateOptions{
|
|
|
|
|
Value = Value,
|
|
|
|
|
OnInput = OnInput,
|
|
|
|
|
OnKeyDown = OnKeyDown,
|
|
|
|
|
RefBack = context
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
</div>
|
2022-11-13 13:57:41 +08:00
|
|
|
|
</Unbound>
|
|
|
|
|
</OverlayTrigger>
|
|
|
|
|
</CascadingValue>
|