Skip to content

Commit 0dec74e

Browse files
committed
Revert "feat(GenerateComponentType)#4982-Numeric-type-rendered"
This reverts commit 7309a05.
1 parent 7309a05 commit 0dec74e

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/BootstrapBlazor/Utils/Utility.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Microsoft.Extensions.Localization;
88
using System.ComponentModel;
99
using System.Data;
10-
using System.Globalization;
1110
using System.Linq.Expressions;
1211
using System.Reflection;
1312

@@ -102,11 +101,6 @@ public static class Utility
102101
/// <returns></returns>
103102
public static TResult GetPropertyValue<TModel, TResult>(TModel model, string fieldName) => CacheManager.GetPropertyValue<TModel, TResult>(model, fieldName);
104103

105-
/// <summary>
106-
/// 获得 当前输入语言小数点分隔符
107-
/// </summary>
108-
private static string NumberDecimalSeparator => CultureInfo.CurrentCulture?.NumberFormat?.NumberDecimalSeparator ?? ".";
109-
110104
/// <summary>
111105
/// 获取 指定对象的属性值
112106
/// </summary>
@@ -435,10 +429,12 @@ public static void CreateDisplayByFieldType(this RenderTreeBuilder builder, IEdi
435429
builder.OpenComponent(0, typeof(Display<>).MakeGenericType(fieldType));
436430
builder.AddAttribute(10, nameof(Display<string>.DisplayText), displayName);
437431
builder.AddAttribute(20, nameof(Display<string>.Value), fieldValue);
438-
builder.AddAttribute(30, nameof(Display<string>.LookupServiceKey), item.LookupServiceKey);
439-
builder.AddAttribute(40, nameof(Display<string>.LookupServiceData), item.LookupServiceData);
440-
builder.AddAttribute(50, nameof(Display<string>.Lookup), item.Lookup);
441-
builder.AddAttribute(60, nameof(Display<string>.ShowLabelTooltip), item.ShowLabelTooltip);
432+
builder.AddAttribute(30, nameof(Display<string>.Lookup), item.Lookup);
433+
builder.AddAttribute(30, nameof(Display<string>.LookupService), item.LookupService);
434+
builder.AddAttribute(40, nameof(Display<string>.LookupServiceKey), item.LookupServiceKey);
435+
builder.AddAttribute(50, nameof(Display<string>.LookupServiceData), item.LookupServiceData);
436+
builder.AddAttribute(60, nameof(Display<string>.LookupStringComparison), item.LookupStringComparison);
437+
builder.AddAttribute(65, nameof(Display<string>.ShowLabelTooltip), item.ShowLabelTooltip);
442438
if (item is ITableColumn col)
443439
{
444440
if (col.Formatter != null)
@@ -528,6 +524,7 @@ public static void CreateComponentByFieldType(this RenderTreeBuilder builder, Co
528524
if (item.IsLookup() && item.Items == null)
529525
{
530526
builder.AddAttribute(110, nameof(Select<SelectedItem>.ShowSearch), item.ShowSearchWhenSelect);
527+
builder.AddAttribute(115, nameof(Select<SelectedItem>.Items), item.Lookup);
531528
builder.AddAttribute(120, nameof(Select<SelectedItem>.LookupService), lookupService);
532529
builder.AddAttribute(121, nameof(Select<SelectedItem>.LookupServiceKey), item.LookupServiceKey);
533530
builder.AddAttribute(122, nameof(Select<SelectedItem>.LookupServiceData), item.LookupServiceData);
@@ -641,7 +638,7 @@ private static Type GenerateComponentType(IEditorItem item)
641638
{
642639
ret = typeof(NullSwitch);
643640
}
644-
else if (fieldType.IsNumber() && NumberDecimalSeparator == ".")
641+
else if (fieldType.IsNumber())
645642
{
646643
ret = typeof(BootstrapInputNumber<>).MakeGenericType(fieldType);
647644
}

0 commit comments

Comments
 (0)