Skip to content

Commit bcc5b73

Browse files
committed
feat: 增加扩展方法
1 parent f14c652 commit bcc5b73

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/BootstrapBlazor/Extensions/IEditorItemExtensions.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ namespace BootstrapBlazor.Components;
1212
/// </summary>
1313
public static class IEditorItemExtensions
1414
{
15+
/// <summary>
16+
/// 判断当前 IEditorItem 实例是否为 Lookup 类型
17+
/// </summary>
18+
/// <param name="item"></param>
19+
/// <returns></returns>
20+
public static bool IsLookup(this IEditorItem item) => item.Lookup != null || item.LookupService != null || !string.IsNullOrEmpty(item.LookupServiceKey);
21+
1522
/// <summary>
1623
/// 判断当前 IEditorItem 实例是否可以编辑
1724
/// </summary>

0 commit comments

Comments
 (0)