mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-12-05 21:50:05 +08:00
!3656 doc(#I67AHF): update BarCode doc
* 使用 PackageTips 组件简化文档代码 * 使用 PackageTips 组件简化文档代码
This commit is contained in:
parent
8ca61779bd
commit
7d1307e15b
@ -4105,9 +4105,6 @@
|
||||
"BootstrapBlazor.Shared.Samples.QRCodes": {
|
||||
"Title": "QRCode",
|
||||
"SubTitle": "Generate QR code",
|
||||
"Tips": "<div><code>QRCode</code> Component dependency then expansion package <code>BootstrapBlazor.BarCode</code>, please follow the prompts below for customized installation</div>",
|
||||
"Nuget": "Install nuget package",
|
||||
"NugetIntro": "use <a href=\"https://www.nuget.org/packages?q=BootstrapBlazor.BarCode\" target=\"_blank\">nuget.org</a> conduct <code>BootstrapBlazor.BarCode</code>",
|
||||
"NormalTitle": "Basic usage",
|
||||
"NormalIntro": "Click the Generate button to generate a <code>QRCode</code>",
|
||||
"ContentTitle": "Direct build",
|
||||
|
@ -4104,9 +4104,6 @@
|
||||
"BootstrapBlazor.Shared.Samples.QRCodes": {
|
||||
"Title": "QRCode 二维码",
|
||||
"SubTitle": "用于二维码生成",
|
||||
"Tips": "<div><code>QRCode</code> 组件依赖扩展包 <code>BootstrapBlazor.BarCode</code>,请按照下面提示进行自定义安装</div>",
|
||||
"Nuget": "Nuget 包安装",
|
||||
"NugetIntro": "使用 <a href=\"https://www.nuget.org/packages?q=BootstrapBlazor.BarCode\" target=\"_blank\">nuget.org</a> 进行 <code>BootstrapBlazor.BarCode</code> 组件的安装",
|
||||
"NormalTitle": "基础用法",
|
||||
"NormalIntro": "点击生成按钮,生成特定的 <code>QRCode</code>",
|
||||
"ContentTitle": "直接生成",
|
||||
|
@ -4,22 +4,7 @@
|
||||
|
||||
<h4>@SubTitle</h4>
|
||||
|
||||
<Tips class="mt-3">
|
||||
@((MarkupString)Localizer["Tips"].Value)
|
||||
</Tips>
|
||||
|
||||
<div><b>@Localizer["Nuget"]</b></div>
|
||||
|
||||
<div class="mt-2">@((MarkupString)Localizer["NugetIntro"].Value)</div>
|
||||
|
||||
<div class="code-label mt-3">.NET CLI</div>
|
||||
<Pre class="no-highlight">dotnet add package BootstrapBlazor.BarCode --version @Version</Pre>
|
||||
|
||||
<div class="code-label">PackageReference</div>
|
||||
<Pre class="no-highlight"><PackageReference Include="BootstrapBlazor.BarCode" Version="@Version" /></Pre>
|
||||
|
||||
<div class="code-label">Package Manager</div>
|
||||
<Pre class="no-highlight">Install-Package BootstrapBlazor.BarCode -Version @Version</Pre>
|
||||
<PackageTips Name="BootstrapBlazor.BarCode" />
|
||||
|
||||
<DemoBlock Title="@Localizer["NormalTitle"]" Introduction="@Localizer["NormalIntro"]" Name="Normal">
|
||||
<QRCode OnGenerated="@OnGenerated" ShowButtons="true"></QRCode>
|
||||
|
@ -11,11 +11,6 @@ namespace BootstrapBlazor.Shared.Samples;
|
||||
/// </summary>
|
||||
public sealed partial class QRCodes
|
||||
{
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private VersionService? VersionManager { get; set; }
|
||||
|
||||
private string Version { get; set; } = "fetching";
|
||||
|
||||
[NotNull]
|
||||
private string? Title { get; set; }
|
||||
@ -50,16 +45,7 @@ public sealed partial class QRCodes
|
||||
BaseUsageText ??= Localizer[nameof(BaseUsageText)];
|
||||
IntroText ??= Localizer[nameof(IntroText)];
|
||||
SuccessText ??= Localizer[nameof(SuccessText)];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OnInitializedAsync 方法
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
Version = await VersionManager.GetVersionAsync("bootstrapblazor.barcode");
|
||||
}
|
||||
}
|
||||
|
||||
private Task OnGenerated()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user