diff --git a/src/Server.UI/Components/Autocompletes/LanguageAutocomplete.cs b/src/Server.UI/Components/Autocompletes/LanguageAutocomplete.cs index 6504322f3..98c56d5f9 100644 --- a/src/Server.UI/Components/Autocompletes/LanguageAutocomplete.cs +++ b/src/Server.UI/Components/Autocompletes/LanguageAutocomplete.cs @@ -18,7 +18,7 @@ public LanguageAutocomplete() private List Languages { get; set; } = LocalizationConstants.SupportedLanguages.ToList(); - private Task> SearchFunc_(string value, CancellationToken cancellation = default) + private Task> SearchFunc_(string? value, CancellationToken cancellation = default) { // 如果输入为空,返回完整的语言列表;否则进行模糊搜索 return string.IsNullOrEmpty(value) diff --git a/src/Server.UI/Components/Autocompletes/MultiTenantAutocomplete.razor.cs b/src/Server.UI/Components/Autocompletes/MultiTenantAutocomplete.razor.cs index 4ba0cf5bc..cc6b22c0e 100644 --- a/src/Server.UI/Components/Autocompletes/MultiTenantAutocomplete.razor.cs +++ b/src/Server.UI/Components/Autocompletes/MultiTenantAutocomplete.razor.cs @@ -33,7 +33,7 @@ protected override async ValueTask DisposeAsyncCore() await base.DisposeAsyncCore(); } - private Task> SearchKeyValues(string value, CancellationToken cancellation) + private Task> SearchKeyValues(string? value, CancellationToken cancellation) { IEnumerable result; diff --git a/src/Server.UI/Components/Autocompletes/PickSuperiorIdAutocomplete.razor.cs b/src/Server.UI/Components/Autocompletes/PickSuperiorIdAutocomplete.razor.cs index 95b6d7628..390cf9d1f 100644 --- a/src/Server.UI/Components/Autocompletes/PickSuperiorIdAutocomplete.razor.cs +++ b/src/Server.UI/Components/Autocompletes/PickSuperiorIdAutocomplete.razor.cs @@ -20,7 +20,7 @@ public PickSuperiorIdAutocomplete() [Inject] private IUserService UserService { get; set; } = default!; - private Task> SearchKeyValues(string value, CancellationToken cancellation) + private Task> SearchKeyValues(string? value, CancellationToken cancellation) { var result = UserService.DataSource.Where(x => x.TenantId != null && x.TenantId.Equals(TenantId) && !x.UserName.Equals(OwnerName)); diff --git a/src/Server.UI/Components/Autocompletes/PickUserAutocomplete.razor.cs b/src/Server.UI/Components/Autocompletes/PickUserAutocomplete.razor.cs index 0ba5ca5e7..f8133a510 100644 --- a/src/Server.UI/Components/Autocompletes/PickUserAutocomplete.razor.cs +++ b/src/Server.UI/Components/Autocompletes/PickUserAutocomplete.razor.cs @@ -36,7 +36,7 @@ protected override async ValueTask DisposeAsyncCore() await base.DisposeAsyncCore(); } - private Task> SearchKeyValues(string value, CancellationToken cancellation) + private Task> SearchKeyValues(string? value, CancellationToken cancellation) { var result = UserService.DataSource.Where(x => x.TenantId != null && x.TenantId.Equals(TenantId)); diff --git a/src/Server.UI/Components/Autocompletes/PicklistAutocomplete.razor.cs b/src/Server.UI/Components/Autocompletes/PicklistAutocomplete.razor.cs index b8ddff3c6..4637fea35 100644 --- a/src/Server.UI/Components/Autocompletes/PicklistAutocomplete.razor.cs +++ b/src/Server.UI/Components/Autocompletes/PicklistAutocomplete.razor.cs @@ -40,7 +40,7 @@ protected override async ValueTask DisposeAsyncCore() await base.DisposeAsyncCore(); } - private Task> SearchFunc_(string value, CancellationToken cancellation = default) + private Task> SearchFunc_(string? value, CancellationToken cancellation = default) { // if text is null or empty, show complete list return string.IsNullOrEmpty(value) diff --git a/src/Server.UI/Components/Autocompletes/TimeZoneAutocomplete.cs b/src/Server.UI/Components/Autocompletes/TimeZoneAutocomplete.cs index 5ffa53b57..340d80562 100644 --- a/src/Server.UI/Components/Autocompletes/TimeZoneAutocomplete.cs +++ b/src/Server.UI/Components/Autocompletes/TimeZoneAutocomplete.cs @@ -16,7 +16,7 @@ public TimeZoneAutocomplete() private List TimeZones { get; set; } = TimeZoneInfo.GetSystemTimeZones().ToList(); - private Task> SearchFunc_(string value, CancellationToken cancellation = default) + private Task> SearchFunc_(string? value, CancellationToken cancellation = default) { return string.IsNullOrEmpty(value) ? Task.FromResult(TimeZones.Select(tz => tz.Id).AsEnumerable()) diff --git a/src/Server.UI/Server.UI.csproj b/src/Server.UI/Server.UI.csproj index a01317dfa..bdf5992c3 100644 --- a/src/Server.UI/Server.UI.csproj +++ b/src/Server.UI/Server.UI.csproj @@ -20,7 +20,7 @@ - +