|
7 | 7 | using Microsoft.Extensions.Localization; |
8 | 8 | using System.ComponentModel; |
9 | 9 | using System.Data; |
10 | | -using System.Globalization; |
11 | 10 | using System.Linq.Expressions; |
12 | 11 | using System.Reflection; |
13 | 12 |
|
@@ -102,11 +101,6 @@ public static class Utility |
102 | 101 | /// <returns></returns> |
103 | 102 | public static TResult GetPropertyValue<TModel, TResult>(TModel model, string fieldName) => CacheManager.GetPropertyValue<TModel, TResult>(model, fieldName); |
104 | 103 |
|
105 | | - /// <summary> |
106 | | - /// 获得 当前输入语言小数点分隔符 |
107 | | - /// </summary> |
108 | | - private static string NumberDecimalSeparator => CultureInfo.CurrentCulture?.NumberFormat?.NumberDecimalSeparator ?? "."; |
109 | | - |
110 | 104 | /// <summary> |
111 | 105 | /// 获取 指定对象的属性值 |
112 | 106 | /// </summary> |
@@ -435,10 +429,12 @@ public static void CreateDisplayByFieldType(this RenderTreeBuilder builder, IEdi |
435 | 429 | builder.OpenComponent(0, typeof(Display<>).MakeGenericType(fieldType)); |
436 | 430 | builder.AddAttribute(10, nameof(Display<string>.DisplayText), displayName); |
437 | 431 | 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); |
442 | 438 | if (item is ITableColumn col) |
443 | 439 | { |
444 | 440 | if (col.Formatter != null) |
@@ -528,6 +524,7 @@ public static void CreateComponentByFieldType(this RenderTreeBuilder builder, Co |
528 | 524 | if (item.IsLookup() && item.Items == null) |
529 | 525 | { |
530 | 526 | builder.AddAttribute(110, nameof(Select<SelectedItem>.ShowSearch), item.ShowSearchWhenSelect); |
| 527 | + builder.AddAttribute(115, nameof(Select<SelectedItem>.Items), item.Lookup); |
531 | 528 | builder.AddAttribute(120, nameof(Select<SelectedItem>.LookupService), lookupService); |
532 | 529 | builder.AddAttribute(121, nameof(Select<SelectedItem>.LookupServiceKey), item.LookupServiceKey); |
533 | 530 | builder.AddAttribute(122, nameof(Select<SelectedItem>.LookupServiceData), item.LookupServiceData); |
@@ -641,7 +638,7 @@ private static Type GenerateComponentType(IEditorItem item) |
641 | 638 | { |
642 | 639 | ret = typeof(NullSwitch); |
643 | 640 | } |
644 | | - else if (fieldType.IsNumber() && NumberDecimalSeparator == ".") |
| 641 | + else if (fieldType.IsNumber()) |
645 | 642 | { |
646 | 643 | ret = typeof(BootstrapInputNumber<>).MakeGenericType(fieldType); |
647 | 644 | } |
|
0 commit comments