@@ -26,61 +26,12 @@ public partial class AutoComplete
2626 [ NotNull ]
2727 public IEnumerable < string > ? Items { get ; set ; }
2828
29- /// <summary>
30- /// 获得/设置 匹配数据时显示的数量
31- /// </summary>
32- [ Parameter ]
33- [ NotNull ]
34- public int ? DisplayCount { get ; set ; }
35-
36- /// <summary>
37- /// 获得/设置 是否开启模糊查询,默认为 false
38- /// </summary>
39- [ Parameter ]
40- public bool IsLikeMatch { get ; set ; }
41-
42- /// <summary>
43- /// 获得/设置 匹配时是否忽略大小写,默认为 true
44- /// </summary>
45- [ Parameter ]
46- public bool IgnoreCase { get ; set ; } = true ;
47-
4829 /// <summary>
4930 /// 获得/设置 自定义集合过滤规则 默认 null
5031 /// </summary>
5132 [ Parameter ]
5233 public Func < string , Task < IEnumerable < string > > > ? OnCustomFilter { get ; set ; }
5334
54- /// <summary>
55- /// 获得/设置 下拉菜单选择回调方法 默认 null
56- /// </summary>
57- [ Parameter ]
58- public Func < string , Task > ? OnSelectedItemChanged { get ; set ; }
59-
60- /// <summary>
61- /// 获得/设置 是否跳过 Enter 按键处理 默认 false
62- /// </summary>
63- [ Parameter ]
64- public bool SkipEnter { get ; set ; }
65-
66- /// <summary>
67- /// 获得/设置 是否跳过 Esc 按键处理 默认 false
68- /// </summary>
69- [ Parameter ]
70- public bool SkipEsc { get ; set ; }
71-
72- /// <summary>
73- /// 获得/设置 滚动行为 默认 <see cref="ScrollIntoViewBehavior.Smooth"/>
74- /// </summary>
75- [ Parameter ]
76- public ScrollIntoViewBehavior ScrollIntoViewBehavior { get ; set ; } = ScrollIntoViewBehavior . Smooth ;
77-
78- /// <summary>
79- /// 获得/设置 候选项模板 默认 null
80- /// </summary>
81- [ Parameter ]
82- public RenderFragment < string > ? ItemTemplate { get ; set ; }
83-
8435 /// <summary>
8536 /// 获得/设置 图标
8637 /// </summary>
@@ -100,27 +51,6 @@ public partial class AutoComplete
10051 [ NotNull ]
10152 private IStringLocalizer < AutoComplete > ? Localizer { get ; set ; }
10253
103- /// <summary>
104- /// 获得/设置 UI 呈现数据集合
105- /// </summary>
106- [ NotNull ]
107- protected List < string > ? FilterItems { get ; set ; }
108-
109- /// <summary>
110- /// 获得 是否跳过 ESC 按键字符串
111- /// </summary>
112- protected string ? SkipEscString => SkipEsc ? "true" : null ;
113-
114- /// <summary>
115- /// 获得 是否跳过 Enter 按键字符串
116- /// </summary>
117- protected string ? SkipEnterString => SkipEnter ? "true" : null ;
118-
119- /// <summary>
120- /// 获得 滚动行为字符串
121- /// </summary>
122- protected string ? ScrollIntoViewBehaviorString => ScrollIntoViewBehavior == ScrollIntoViewBehavior . Smooth ? null : ScrollIntoViewBehavior . ToDescriptionString ( ) ;
123-
12454 /// <summary>
12555 /// <inheritdoc/>
12656 /// </summary>
@@ -138,26 +68,14 @@ protected override void OnParametersSet()
13868 {
13969 base . OnParametersSet ( ) ;
14070
71+ LoadingIcon ??= IconTheme . GetIconByKey ( ComponentIcons . LoadingIcon ) ;
14172 NoDataTip ??= Localizer [ nameof ( NoDataTip ) ] ;
14273 PlaceHolder ??= Localizer [ nameof ( PlaceHolder ) ] ;
14374 Icon ??= IconTheme . GetIconByKey ( ComponentIcons . AutoCompleteIcon ) ;
144- LoadingIcon ??= IconTheme . GetIconByKey ( ComponentIcons . LoadingIcon ) ;
14575
14676 FilterItems = Items ? . ToList ( ) ?? [ ] ;
14777 }
14878
149- /// <summary>
150- /// 鼠标点击候选项时回调此方法
151- /// </summary>
152- protected async Task OnClickItem ( string val )
153- {
154- CurrentValue = val ;
155- if ( OnSelectedItemChanged != null )
156- {
157- await OnSelectedItemChanged ( val ) ;
158- }
159- }
160-
16179 /// <summary>
16280 /// TriggerOnChange 方法
16381 /// </summary>
0 commit comments