Skip to content

Commit c3caf7d

Browse files
authored
fix(Progress): culture causes decimal points to be changed to commas (#6362)
* refactor: 格式化增加文化信息 * doc: 更新示例 * chore: bump version 9.8.1-beta01
1 parent 48f8936 commit c3caf7d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/BootstrapBlazor.Server/Components/Samples/Progress.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<DemoBlock Title="@Localizer["ProgressDisplayValueTitle"]"
3030
Introduction="@Localizer["ProgressDisplayValueIntro"]"
3131
Name="DisplayValue">
32-
<BootstrapBlazor.Components.Progress Value="25" IsShowValue="true"></BootstrapBlazor.Components.Progress>
32+
<BootstrapBlazor.Components.Progress Value="25.5" IsShowValue="true"></BootstrapBlazor.Components.Progress>
3333
</DemoBlock>
3434

3535
<DemoBlock Title="@Localizer["ProgressHeightTitle"]"

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.8.0</Version>
4+
<Version>9.8.1-beta01</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Progress/Progress.razor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
55

6+
using System.Globalization;
7+
68
namespace BootstrapBlazor.Components;
79

810
/// <summary>
@@ -85,7 +87,7 @@ public partial class Progress
8587
/// 获得 Style 集合
8688
/// </summary>
8789
private string? StyleName => CssBuilder.Default()
88-
.AddClass($"width: {InternalValue}%;")
90+
.AddClass($"width: {InternalValue.ToString(CultureInfo.InvariantCulture)}%;")
8991
.Build();
9092

9193
/// <summary>

0 commit comments

Comments
 (0)