mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-03 12:37:40 +08:00
fix(module: core): enum name supports localization (#3536)
This commit is contained in:
parent
57bdf4b01e
commit
50c13245cd
@ -61,7 +61,7 @@ namespace AntDesign
|
||||
{
|
||||
var enumName = Enum.GetName(_enumType, enumValue);
|
||||
var fieldInfo = _enumType.GetField(enumName);
|
||||
return fieldInfo.GetCustomAttribute<DisplayAttribute>(true)?.Name ?? enumName;
|
||||
return fieldInfo.GetCustomAttribute<DisplayAttribute>(true)?.GetName() ?? enumName;
|
||||
}
|
||||
|
||||
private static Func<T, T, T> BuildAggregateFunction()
|
||||
|
Loading…
Reference in New Issue
Block a user