-
-
Notifications
You must be signed in to change notification settings - Fork 364
feat(RadioListGeneric): implement RadioListGeneric component #4908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
58b1918
feat: 更新逻辑
ArgoZhang c299e1d
refactor: 重构组件
ArgoZhang dd24781
doc: 增加示例
ArgoZhang ef3cf71
Merge branch 'dev-radio-list' into dev
ArgoZhang 868bba4
doc: 更新 CheckboxList 示例
ArgoZhang cb693f2
doc: 更新 RadioList 示例
ArgoZhang 2c32394
feat: 增加 Value 逻辑
ArgoZhang 4e589b5
test: 增加单元测试
ArgoZhang aa14e7e
chore: bump version 9.1.6
A5196060 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,9 @@ | |
| // See the LICENSE file in the project root for more information. | ||
| // Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone | ||
|
|
||
| using DocumentFormat.OpenXml.Office2010.Excel; | ||
| using DocumentFormat.OpenXml.Wordprocessing; | ||
|
|
||
| namespace BootstrapBlazor.Server.Components.Samples; | ||
|
|
||
| /// <summary> | ||
|
|
@@ -52,6 +55,12 @@ private Task OnSelectedChanged(IEnumerable<SelectedItem> values, string val) | |
| return Task.CompletedTask; | ||
| } | ||
|
|
||
| [NotNull] | ||
| private IEnumerable<SelectedItem<Foo>>? GenericItems { get; set; } | ||
|
|
||
| [NotNull] | ||
| private Foo? _selectedFoo = default; | ||
|
|
||
| /// <summary> | ||
| /// OnInitialized 方法 | ||
| /// </summary> | ||
|
|
@@ -85,6 +94,15 @@ protected override void OnInitialized() | |
|
|
||
| Model = Foo.Generate(LocalizerFoo); | ||
| FooItems = Foo.GetCompleteItems(LocalizerFoo); | ||
|
|
||
| GenericItems = new List<SelectedItem<Foo>>() | ||
| { | ||
| new() { Text = Localizer["item1"], Value = new Foo() { Id = 1, Name = LocalizerFoo["Foo.Name", "001"] } }, | ||
| new() { Text = Localizer["item2"], Value = new Foo() { Id = 2, Name = LocalizerFoo["Foo.Name", "002"] } }, | ||
| new() { Text = Localizer["item3"], Value = new Foo() { Id = 3, Name = LocalizerFoo["Foo.Name", "003"] } }, | ||
| }; | ||
|
|
||
| _selectedFoo = new Foo() { Id = 1, Name = LocalizerFoo["Foo.Name", "001"] }; | ||
| } | ||
|
|
||
| private Task OnItemChanged(IEnumerable<SelectedItem> values, SelectedItem val) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.