66namespace BootstrapBlazor . Components ;
77
88/// <summary>
9- /// SelectBase 组件基类
9+ /// SelectBase component base class
1010/// </summary>
11+ /// <typeparam name="TValue">The type of the value.</typeparam>
1112public abstract class SelectBase < TValue > : PopoverSelectBase < TValue >
1213{
1314 /// <summary>
14- /// 获得/设置 颜色 默认 Color.None 无设置
15+ /// Gets or sets the color. The default is <see cref=" Color.None"/> (no color).
1516 /// </summary>
1617 [ Parameter ]
1718 public Color Color { get ; set ; }
1819
1920 /// <summary>
20- /// 获得/设置 是否显示搜索框 默认为 false 不显示
21+ /// Gets or sets a value indicating whether to show the search box. The default is <c>false</c>.
2122 /// </summary>
2223 [ Parameter ]
2324 public bool ShowSearch { get ; set ; }
2425
2526 /// <summary>
26- /// 获得/设置 设置搜索图标
27+ /// Gets or sets the search icon.
2728 /// </summary>
2829 [ Parameter ]
2930 public string ? SearchIcon { get ; set ; }
3031
3132 /// <summary>
32- /// 获得/设置 设置正在搜索图标
33+ /// Gets or sets the search loading icon.
3334 /// </summary>
3435 [ Parameter ]
3536 public string ? SearchLoadingIcon { get ; set ; }
3637
3738 /// <summary>
38- /// 获得/设置 搜索框文本
39+ /// Gets or sets the search text.
3940 /// </summary>
4041 [ NotNull ]
4142 protected string ? SearchText { get ; set ; }
4243
4344 /// <summary>
44- /// 获得/设置 无搜索结果时显示文字
45+ /// Gets or sets the text to display when no search results are found.
4546 /// </summary>
4647 [ Parameter ]
4748 public string ? NoSearchDataText { get ; set ; }
4849
4950 /// <summary>
50- /// 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up
51+ /// Gets or sets the dropdown icon. The default is " fa-solid fa-angle-up".
5152 /// </summary>
5253 [ Parameter ]
5354 [ NotNull ]
5455 public string ? DropdownIcon { get ; set ; }
5556
5657 /// <summary>
57- /// 获得/设置 是否为 MarkupString 默认 false
58+ /// Gets or sets a value indicating whether the content is a <see cref=" MarkupString"/>. The default is <c> false</c>.
5859 /// </summary>
5960 [ Parameter ]
6061 public bool IsMarkupString { get ; set ; }
6162
6263 /// <summary>
63- /// 获得/设置 字符串比较规则 默认 StringComparison.OrdinalIgnoreCase 大小写不敏感
64+ /// Gets or sets the string comparison rule. The default is <see cref=" StringComparison.OrdinalIgnoreCase"/>.
6465 /// </summary>
6566 [ Parameter ]
6667 public StringComparison StringComparison { get ; set ; } = StringComparison . OrdinalIgnoreCase ;
6768
6869 /// <summary>
69- /// 获得/设置 分组项模板
70+ /// Gets or sets the group item template.
7071 /// </summary>
7172 [ Parameter ]
7273 public RenderFragment < string > ? GroupItemTemplate { get ; set ; }
7374
7475 /// <summary>
75- /// 获得/设置 滚动行为 默认 <see cref="ScrollIntoViewBehavior.Smooth"/>
76+ /// Gets or sets the scroll behavior. The default is <see cref="ScrollIntoViewBehavior.Smooth"/>.
7677 /// </summary>
7778 [ Parameter ]
7879 public ScrollIntoViewBehavior ScrollIntoViewBehavior { get ; set ; } = ScrollIntoViewBehavior . Smooth ;
7980
8081 /// <summary>
81- /// 获得/设置 IIconTheme 服务实例
82+ /// Gets or sets the <see cref=" IIconTheme"/> service instance.
8283 /// </summary>
8384 [ Inject ]
8485 [ NotNull ]
8586 protected IIconTheme ? IconTheme { get ; set ; }
8687
8788 /// <summary>
88- /// 获得 PlaceHolder 属性
89+ /// Gets or sets the placeholder text.
8990 /// </summary>
9091 [ Parameter ]
9192 public string ? PlaceHolder { get ; set ; }
9293
9394 /// <summary>
94- /// 获得 SearchIcon 图标字符串 默认增加 icon 样式
95+ /// Gets the search icon string with default " icon search-icon" class.
9596 /// </summary>
9697 protected string ? SearchIconString => CssBuilder . Default ( "icon search-icon" )
9798 . AddClass ( SearchIcon )
9899 . Build ( ) ;
99100
100101 /// <summary>
101- /// <inheritdoc/>
102+ /// Gets the custom class string.
102103 /// </summary>
103104 protected override string ? CustomClassString => CssBuilder . Default ( )
104105 . AddClass ( "select" , IsPopover )
105106 . AddClass ( base . CustomClassString )
106107 . Build ( ) ;
107108
108109 /// <summary>
109- /// 获得 样式集合
110+ /// Gets the append class string.
110111 /// </summary>
111112 protected string ? AppendClassString => CssBuilder . Default ( "form-select-append" )
112113 . AddClass ( $ "text-{ Color . ToDescriptionString ( ) } ", Color != Color . None && ! IsDisabled && ! IsValid . HasValue )
@@ -126,14 +127,14 @@ protected override void OnParametersSet()
126127 }
127128
128129 /// <summary>
129- /// 显示下拉框方法
130+ /// Shows the dropdown.
130131 /// </summary>
131- /// <returns></returns>
132+ /// <returns>A <see cref="Task"/> representing the asynchronous operation. </returns>
132133 public Task Show ( ) => InvokeVoidAsync ( "show" , Id ) ;
133134
134135 /// <summary>
135- /// 关闭下拉框方法
136+ /// Hides the dropdown.
136137 /// </summary>
137- /// <returns></returns>
138+ /// <returns>A <see cref="Task"/> representing the asynchronous operation. </returns>
138139 public Task Hide ( ) => InvokeVoidAsync ( "hide" , Id ) ;
139140}
0 commit comments