Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/BootstrapBlazor/Utils/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Extensions.Localization;
using System.ComponentModel;
using System.Data;
using System.Globalization;
using System.Linq.Expressions;
using System.Reflection;

Expand Down Expand Up @@ -192,6 +193,11 @@ public static class Utility
? null
: CacheManager.GetPlaceholder(modelType, fieldName);

/// <summary>
/// 获得 当前输入语言小数点分隔符
/// </summary>
private static string NumberDecimalSeparator => CultureInfo.CurrentCulture?.NumberFormat?.NumberDecimalSeparator ?? ".";

/// <summary>
/// 通过 数据类型与字段名称获取 PropertyInfo 实例方法
/// </summary>
Expand Down Expand Up @@ -638,7 +644,7 @@ private static Type GenerateComponentType(IEditorItem item)
{
ret = typeof(NullSwitch);
}
else if (fieldType.IsNumber())
else if (fieldType.IsNumber() && NumberDecimalSeparator == ".")
{
ret = typeof(BootstrapInputNumber<>).MakeGenericType(fieldType);
}
Expand Down
Loading