Skip to content

Commit 856d896

Browse files
authored
doc(BarcodeGenerator): update BarcodeGenerator documentation (#7610)
* doc: 撤回资源文件丢失内内容 * doc: 增加条码设置资源文件 * doc: 更新示例 * refactor: 更改命名空间 * doc: 更改命名空间 * doc: 条码生成更改命名空间 * doc: 更新资源文件 * refactor: 更正写法防止工具误删除资源文件 * doc: 更正变量名 * doc: 整理 BaseLayout 资源文件 * doc: 整理 ComponentLayout 资源文件 * doc: 更新资源文件 * doc: 更新实战菜单 * doc: 更新资源文件 * doc: 更新资源文件 * test: 更新资源文件 * test: 更新单元测试 * doc: 增加注释 * doc: 更新资源文件 * doc: 更新描述文字
1 parent 48607cb commit 856d896

19 files changed

Lines changed: 149 additions & 140 deletions

src/BootstrapBlazor.Server/Components/Components/BarcodeGenerateSettings.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
@inject IStringLocalizer<BarcodeGenerateSettings> Localizer
1+
@inject IStringLocalizer<BarcodeGenerateSettings> Localizer
22

33
<GroupBox Title="@Localizer["BarcodeGeneratorGroupBoxText"]">
44
<div class="row form-inline g-3">
55
<div class="col-12 col-sm-6">
6-
<BootstrapInput Value="Value" ShowLabel="true" UseInputEvent="true" OnValueChanged="OnValueChanged" />
6+
<BootstrapInput Value="Value" DisplayText="Value" ShowLabel="true" UseInputEvent="true" OnValueChanged="OnValueChanged" />
77
</div>
88
<div class="col-12 col-sm-6">
99
<Select @bind-Value="Format" OnValueChanged="OnFormatChanged" ShowLabel="true" />

src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ protected override void OnInitialized()
5757
{
5858
base.OnInitialized();
5959

60-
Items = Enum.GetNames<RowType>().Select(i => new SelectedItem(i, Localizer[i]));
60+
Items = new List<SelectedItem>
61+
{
62+
new SelectedItem("Normal", Localizer["Normal"]),
63+
new SelectedItem("Inline", Localizer["Inline"]),
64+
};
6165
}
6266
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
@inject IOptions<WebsiteOptions> WebsiteOption
2-
@inject IStringLocalizer<QQGroup> Localzier
1+
@inject IOptions<WebsiteOptions> WebsiteOption
2+
@inject IStringLocalizer<QQGroup> Localizer
33

44
<div>
5-
@Localzier["Group"]:BootstrapAdmin & Blazor
5+
@Localizer["Group"]:BootstrapAdmin & Blazor
66
<a class="mx-1" target="_blank" href="@WebsiteOption.Value.QQGroup1Link">
77
<span class="text-success fa-brands fa-qq"></span>
88
<span class="text-success"><b>795206915</b></span>
@@ -11,5 +11,5 @@
1111
<span class="text-success fa-brands fa-qq"></span>
1212
<span class="text-success"><b>675147445</b></span>
1313
</a>
14-
@Localzier["Welcome"]
14+
@Localizer["Welcome"]
1515
</div>

src/BootstrapBlazor.Server/Components/Layout/TutorialsNavMenu.razor.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -18,6 +18,10 @@ public partial class TutorialsNavMenu
1818
[NotNull]
1919
private IStringLocalizer<BaseLayout>? AppLocalizer { get; set; }
2020

21+
[Inject]
22+
[NotNull]
23+
private IStringLocalizer<Tutorials>? TutorialsLocalizer { get; set; }
24+
2125
[Inject]
2226
[NotNull]
2327
private IStringLocalizer<Tutorials>? Localizer { get; set; }
@@ -48,12 +52,12 @@ protected override async Task OnInitializedAsync()
4852
new()
4953
{
5054
Template = CreateDownloadButtonComponent("dashboard", _dashboardFileList),
51-
Text = Localizer["DashboardSummary"],
55+
Text = TutorialsLocalizer["DashboardSummary"],
5256
Url = "tutorials/dashboard"
5357
},
5458
new()
5559
{
56-
Text = Localizer["LoginSummary"],
60+
Text = TutorialsLocalizer["LoginSummary"],
5761
Url = "tutorials/login",
5862
Items =
5963
[
@@ -92,24 +96,24 @@ protected override async Task OnInitializedAsync()
9296
new()
9397
{
9498
Template = CreateDownloadButtonComponent("waterfall", _waterfallFileList),
95-
Text = Localizer["WaterfallSummary"],
99+
Text = TutorialsLocalizer["WaterfallSummary"],
96100
Url = "tutorials/waterfall"
97101
},
98102
new()
99103
{
100104
Template = CreateDownloadButtonComponent("translate", _translateFileList),
101-
Text = Localizer["TranslateSummary"],
105+
Text = TutorialsLocalizer["TranslateSummary"],
102106
Url = "tutorials/translate"
103107
},
104108
new()
105109
{
106110
Template = CreateDownloadButtonComponent("drawing", _drawingAppFileList),
107-
Text = Localizer["DrawingSummary"],
111+
Text = TutorialsLocalizer["DrawingSummary"],
108112
Url = "tutorials/drawing"
109113
},
110114
new()
111115
{
112-
Text = Localizer["AdminSummary"],
116+
Text = TutorialsLocalizer["AdminSummary"],
113117
Url = "tutorials/admin",
114118
},
115119
new()

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/BarCodeGenerator.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@namespace BootstrapBlazor.Server.Components.Samples.Tutorials
21
@inject IStringLocalizer<BarCodeGenerator> Localizer
32
@page "/tutorials/barcode"
43

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/BarCodeGenerator.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
55

66
using Microsoft.AspNetCore.Components.Forms;
77

8-
namespace BootstrapBlazor.Server.Components.Samples.Tutorials;
8+
namespace BootstrapBlazor.Server.Components.Samples.Tutorials.BarCodeGenerator;
99

1010
/// <summary>
1111
/// BarCodeGenerator 组件示例代码

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/EmailContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
55

6-
namespace BootstrapBlazor.Server.Components.Samples.Tutorials;
6+
namespace BootstrapBlazor.Server.Components.Samples.Tutorials.BarCodeGenerator;
77

88
/// <summary>
99
/// EmailContent

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/TextContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
55

6-
namespace BootstrapBlazor.Server.Components.Samples.Tutorials;
6+
namespace BootstrapBlazor.Server.Components.Samples.Tutorials.BarCodeGenerator;
77

88
/// <summary>
99
/// TextContent

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/WiFiAuthentication.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
55

66
using System.ComponentModel;
77

8-
namespace BootstrapBlazor.Server.Components.Samples.Tutorials;
8+
namespace BootstrapBlazor.Server.Components.Samples.Tutorials.BarCodeGenerator;
99

1010
/// <summary>
1111
/// WiFiAuthentication enum

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/WiFiContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
55

6-
namespace BootstrapBlazor.Server.Components.Samples.Tutorials;
6+
namespace BootstrapBlazor.Server.Components.Samples.Tutorials.BarCodeGenerator;
77

88
/// <summary>
99
/// WiFi content class

0 commit comments

Comments
 (0)