Skip to content

Commit 9e14211

Browse files
committed
refactor: 更新示例代码
1 parent 8526498 commit 9e14211

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ protected override void OnInitialized()
9191
Model = Foo.Generate(LocalizerFoo);
9292
FooItems = Foo.GetCompleteItems(LocalizerFoo);
9393

94+
_selectedFoo.Name = LocalizerFoo["Foo.Name", "001"];
9495
GenericItems = new List<SelectedItem<Foo>>
9596
{
96-
new() { Text = Localizer["Item1"], Value = new Foo { Id = 1, Name = LocalizerFoo["Foo.Name", "001"] } },
97+
new() { Text = Localizer["Item1"], Value = _selectedFoo },
9798
new() { Text = Localizer["Item2"], Value = new Foo { Id = 2, Name = LocalizerFoo["Foo.Name", "002"] } },
9899
new() { Text = Localizer["Item3"], Value = new Foo { Id = 3, Name = LocalizerFoo["Foo.Name", "003"] } },
99100
};

0 commit comments

Comments
 (0)