Skip to content

Commit 27b95b2

Browse files
ArgoZhangAxxbis
andcommitted
refactor: 复用 IsLookup 扩展方法
Co-Authored-By: ZhYan <[email protected]>
1 parent ece2207 commit 27b95b2

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/BootstrapBlazor/Components/Filters/TableFilter.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ else
4444
{
4545
<EnumFilter Type="Column.PropertyType" Count="_count"></EnumFilter>
4646
}
47-
else if (IsLookup)
47+
else if (Column.IsLookup())
4848
{
4949
<LookupFilter Lookup="Column.Lookup" LookupService="Column.LookupService" LookupServiceKey="Column.LookupServiceKey" LookupServiceData="Column.LookupServiceData" LookupStringComparison="Column.LookupStringComparison" Type="Column.PropertyType" IsShowSearch="Column.ShowSearchWhenSelect"></LookupFilter>
5050
}

src/BootstrapBlazor/Components/Filters/TableFilter.razor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,4 @@ private void OnClickMinus()
256256
_count--;
257257
}
258258
}
259-
260-
private bool IsLookup => Column.Lookup != null || !string.IsNullOrEmpty(Column.LookupServiceKey);
261259
}

src/BootstrapBlazor/Extensions/IEditorItemExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static class IEditorItemExtensions
1717
/// </summary>
1818
/// <param name="item"></param>
1919
/// <returns></returns>
20-
public static bool IsLookup(this IEditorItem item) => item.Lookup != null || item.LookupService != null || !string.IsNullOrEmpty(item.LookupServiceKey);
20+
public static bool IsLookup(this IEditorItem item) => item.Lookup != null || !string.IsNullOrEmpty(item.LookupServiceKey);
2121

2222
/// <summary>
2323
/// 判断当前 IEditorItem 实例是否可以编辑

0 commit comments

Comments
 (0)