mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
41077bc2fb
* select-rewritten select-rewritten * modul: select - update 1 * select-update2 * select-update3 * select-update 4 * feat: append label tag & auto tokenization * fix: conflict in drpdown demo Co-authored-by: Lars Diederich <diederich@evodata.de> Co-authored-by: ElderJames <shunjiey@hotmail.com>
32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using AntDesign.Select.Internal;
|
|
|
|
#pragma warning disable 1591 // Disable missing XML comment
|
|
|
|
namespace AntDesign.Select
|
|
{
|
|
public partial class LabelTemplateItem<TItemValue, TItem>
|
|
{
|
|
[CascadingParameter(Name = "SelectContent")] private SelectContent<TItemValue, TItem> ParentSelectContent { get; set; }
|
|
[CascadingParameter(Name = "SelectOption")] private SelectOptionItem<TItemValue, TItem> SelectOption { get; set; }
|
|
[Parameter] public RenderFragment<TItem> LabelTemplateItemContent { get; set; }
|
|
[Parameter] public string Style { get; set; }
|
|
[Parameter] public string Class { get; set; }
|
|
[Parameter] public string ContentStyle { get; set; }
|
|
[Parameter] public string ContentClass { get; set; }
|
|
[Parameter] public string RemoveIconStyle { get; set; }
|
|
[Parameter] public string RemoveIconClass { get; set; }
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
if (ParentSelectContent.ParentSelect.SelectMode == SelectMode.Default
|
|
&& string.IsNullOrWhiteSpace(Class)
|
|
&& string.IsNullOrWhiteSpace(ContentStyle))
|
|
{
|
|
Class = "ant-select-selection-item";
|
|
ContentStyle = "ant-select-selection-item-content";
|
|
}
|
|
}
|
|
}
|
|
}
|