mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 01:11:52 +08:00
ef22dd5a1b
* feat: add mentions component * fix: update with z-index * feat: new mention components (unfinished) * fix: show chinese letter for affix and tree * refactor: clean code * fix: the display position of the dropdown is consistent with the cursor * fix: mistakes Co-authored-by: ElderJames <shunjiey@hotmail.com> Co-authored-by: zxyao <zxyao145@gmail.com>
59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
@namespace AntDesign
|
|
@using AntDesign.Internal
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
<div class="@ClassMapper.Class">
|
|
<textarea @ref="@Ref"
|
|
@bind="@Value"
|
|
@attributes="@Attributes"
|
|
style="white-space: pre-wrap; @Style"
|
|
id="@Id"
|
|
rows="@Rows"
|
|
disabled="@Disable"
|
|
readonly="@Readonly"
|
|
placeholder="@Placeholder"
|
|
@onfocus="@Onfocus"
|
|
@onblur="@Onblur"
|
|
@onkeypress="@OnKeyPress"
|
|
@onkeydown="@OnKeyDown"
|
|
@onkeyup="@OnKeyUp" />
|
|
|
|
<CascadingValue Value="this">
|
|
@if (ShowSuggestions)
|
|
{
|
|
<div class="ant-mentions-measure" style="z-index:1050;">
|
|
<div>
|
|
<div class="ant-mentions-dropdown" style="@DropdownStyle">
|
|
<div class="ant-mentions-dropdown-menu" role="menu">
|
|
@if (LstOriginalOptions.Count > 0)
|
|
{
|
|
@if (Loading)
|
|
{
|
|
<MentionsOption Value="ANTD_SEARCHING" Disable="true">
|
|
<Spin Size="small"></Spin>
|
|
</MentionsOption>
|
|
}
|
|
else
|
|
{
|
|
|
|
foreach (var item in LstOriginalOptions)
|
|
{
|
|
|
|
<MentionsOption Value="@item.Value">@item.ChildContent</MentionsOption>
|
|
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
@ChildContent
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</CascadingValue>
|
|
|
|
</div> |