doc(GlobalOptions): add GlobalOpton documentation (#3848)

* doc: 更正单词拼写错误

* doc: 增加全局配置文档

* doc: 更改本地化键值

* doc: 更新文档
This commit is contained in:
Argo Zhang 2024-07-13 20:29:53 +08:00 committed by GitHub
parent 5880cc1e39
commit 098894b3bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 107 additions and 3 deletions

View File

@ -0,0 +1,89 @@
@page "/global-option"
@inject IStringLocalizer<GlobalOption> Localizer
<h3>@Localizer["Title"]</h3>
<h4>@((MarkupString)Localizer["SubTitle"].Value)</h4>
<p class="code-label">1. <code>ToastDelay</code></p>
<p> <code>ToastService</code> <code>0</code> 使</p>
<p class="code-label">2. <code>ToastPlacement</code></p>
<p> <code>ToastService</code> <code>null</code> 使</p>
<p class="code-label">3. <code>MessageDelay</code></p>
<p> <code>MessageService</code> <code>0</code> 使</p>
<p class="code-label">4. <code>SwalDelay</code></p>
<p> <code>SwalService</code> <code>0</code> 使</p>
<p class="code-label">5. <code>DefaultCultureInfo</code></p>
<p>使 <code>zh-CN</code> null </p>
<p class="code-label">6. <code>FallbackCulture</code> </p>
<p> <code>CentOS</code> <code>netcore</code> /线 <code>en</code> 使</p>
<p class="code-label">7. <code>EnableFallbackCulture</code> </p>
<p> <code>zh-CN</code> <code>zh-hans</code> <code>zh</code> <code>en-US</code> <code>en</code></p>
<p class="code-label">8. <code>IgnoreLocalizerMissing</code> </p>
<p> <code>IgnoreLocalizerMissing=\"true\"</code> 其默认值为 <code>false</code></p>
<p class="code-label">9. <code>EnableErrorLogger</code> </p>
<p> <code>ErrorLogger</code> <code>true</code></p>
<Pre>{
"BootstrapBlazorOptions": {
"ToastDelay": 4000,
"MessageDelay": 4000,
"SwalDelay": 4000,
"EnableErrorLogger": true,
"FallbackCulture": "en",
"SupportedCultures": [
"zh-CN",
"en-US"
],
"TableSettings": {
"CheckboxColumnWidth": 36,
"TableExportOptions": {
"EnableFormat": true,
"EnableLookup": true,
"AutoMergeArray": true,
"ArrayDelimiter": ","
}
},
"IgnoreLocalizerMissing": true,
"StepSettings": {
"Short": "1",
"Int": "1",
"Long": "1",
"Float": "0.1",
"Double": "0.01",
"Decimal": "0.01"
},
"ConnectionHubOptions": {
"Enable": true,
"EnableIpLocator": true,
"ExpirationScanFrequency": "00:05:00",
"TimeoutInterval": "00:03:00",
"BeatInterval": "00:00:30"
},
"IpLocatorOptions": {
"EnableCache": true,
"SlidingExpiration": "24:00:00",
"ProviderName": "BaiduIpLocatorProvider"
},
"WebClientOptions": {
"EnableIpLocator": true
}
}
}</Pre>

View File

@ -1,5 +1,5 @@
@page "/globalization"
@inject IStringLocalizer<Golbalization> Localizer
@inject IStringLocalizer<Globalization> Localizer
<h3>@Localizer["Title"]</h3>

View File

@ -234,6 +234,11 @@ internal static class MenusLocalizerExtensions
Url = "global-exception"
},
new()
{
Text = Localizer["GlobalOption"],
Url = "global-option"
},
new()
{
Text = Localizer["WebAppBlazor"],
Url = "install-webapp",

View File

@ -1179,7 +1179,7 @@
"P17": "Install Project template",
"P18": "Create Project"
},
"BootstrapBlazor.Server.Components.Pages.Golbalization": {
"BootstrapBlazor.Server.Components.Pages.Globalization": {
"Title": "Globalization",
"SubTitle": "ASP.NET Core Blazor Globalization",
"P1": "Please check <a href='https://learn.microsoft.com/zh-cn/aspnet/core/blazor/globalization-localization?WT.mc_id=DT-MVP-5004174' target='_blank'> before reading the following knowledge points Official document</a>"
@ -1721,6 +1721,10 @@
"Block2Title": "OnErrorHandleAsync",
"Block2Intro": "Set custom exception handling logic by setting <code>OnErrorHandleAsync</code> callback method"
},
"BootstrapBlazor.Server.Components.Pages.GlobalOption": {
"Title": "Global exception",
"SubTitle": "Added component <code>ErrorLogger</code> Through this component, global logs and exceptions can be output uniformly; currently, the <code>Blazor</code> framework does not provide a <code>MVC</code> like <b>Global exception</b> The overall solution"
},
"BootstrapBlazor.Server.Components.Samples.Splits": {
"SplitsTitle": "Split",
"SplitsNormalTitle": "Basic usage",
@ -4439,6 +4443,7 @@
"Breakpoints": "Breakpoints",
"Theme": "Theme",
"GlobalException": "Global Exception",
"GlobalOption": "Global Option",
"LayoutPage": "Admin Template",
"FAIcon": "FontAwesome Icons",
"Components": "Components",

View File

@ -1179,7 +1179,7 @@
"P17": "安装项目模板",
"P18": "创建项目"
},
"BootstrapBlazor.Server.Components.Pages.Golbalization": {
"BootstrapBlazor.Server.Components.Pages.Globalization": {
"Title": "全球化",
"SubTitle": "ASP.NET Core Blazor 全球化",
"P1": "阅读以下知识点前请先查看 <a href='https://learn.microsoft.com/zh-cn/aspnet/core/blazor/globalization-localization?WT.mc_id=DT-MVP-5004174' target='_blank'>微软官方文档</a>"
@ -1721,6 +1721,10 @@
"Block2Title": "自定义错误处理",
"Block2Intro": "通过设置 <code>OnErrorHandleAsync</code> 回调方法,设置自定义异常处理逻辑"
},
"BootstrapBlazor.Server.Components.Pages.GlobalOption": {
"Title": "全局配置",
"SubTitle": "组件库提供一种对当前应用程序中所有组件进行配置的方法,通过 <code>BootstrapBlazorOptions</code> 全局配置类实现此功能"
},
"BootstrapBlazor.Server.Components.Samples.Splits": {
"SplitsTitle": "Split 面板分割",
"SplitsNormalTitle": "基础用法",
@ -4439,6 +4443,7 @@
"Theme": "组件主题",
"Labels": "表单标签",
"GlobalException": "全局异常",
"GlobalOption": "全局配置",
"LayoutPage": "后台模拟器",
"FAIcon": "FontAwesome 图标集合",
"Components": "组件总览",