-
-
Notifications
You must be signed in to change notification settings - Fork 362
doc(WebClientService): add IpLocator function documentation #6403
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,14 @@ | |
| <h4>@Localizer["SubTitle"]</h4> | ||
|
|
||
| <DemoBlock Title="@Localizer["BasicUsageTitle"]" Introduction="@Localizer["BasicUsageIntro"]" Name="Normal"> | ||
| <p>@Localizer["BasicUsageP1"]</p> | ||
| <div class="mb-3"> | ||
| <section ignore> | ||
| <p>@Localizer["BasicUsageP1"]</p> | ||
| <p class="code-label">@((MarkupString)Localizer["BasicUsageP2"].Value)</p> | ||
| <Pre>public void Configure(IApplicationBuilder app) | ||
| { | ||
| // ... | ||
| // 增加下面这一行 | ||
| // add this line | ||
| app.UseBootstrapBlazor(); | ||
| app.UseEndpoints(endpoints => | ||
| { | ||
|
|
@@ -21,13 +22,11 @@ | |
| endpoints.MapFallbackToPage("/_Host"); | ||
| }); | ||
| }</Pre> | ||
| </div> | ||
|
|
||
| <Tips> | ||
| <p>@((MarkupString)Localizer["BasicUsageTips"].Value)</p> | ||
| </Tips> | ||
| <Tips> | ||
| <p>@((MarkupString)Localizer["BasicUsageTips"].Value)</p> | ||
| </Tips> | ||
|
|
||
| <div class="mb-3"> | ||
| <p class="code-label">@((MarkupString)Localizer["BasicUsageP3"].Value)</p> | ||
| <Pre>[Inject] | ||
| [NotNull] | ||
|
|
@@ -44,9 +43,29 @@ protected override async Task OnAfterRenderAsync(bool firstRender) | |
| ClientInfo = await ClientService.GetClientInfo(); | ||
| StateHasChanged(); | ||
| } | ||
| } | ||
| </Pre> | ||
| </div> | ||
| }</Pre> | ||
|
|
||
| <p class="code-label">@((MarkupString)Localizer["BasicUsageP4"].Value)</p> | ||
| <p>@((MarkupString)Localizer["LocatorsProviderOptions"].Value)</p> | ||
| <p>@((MarkupString)Localizer["LocatorsProviderDesc1"].Value)</p> | ||
| <Pre>{ | ||
|
Comment on lines
+49
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: The JSON snippet in the block is not properly closed. |
||
| "BootstrapBlazorOptions": { | ||
| "WebClientOptions": { | ||
| "EnableIpLocator": true | ||
| } | ||
| }</Pre> | ||
| <p>@((MarkupString)Localizer["LocatorsProviderDesc2"].Value)</p> | ||
| <Pre>services.AddBootstrapBlazor(op => | ||
| { | ||
| op.WebClientOptions.EnableIpLocator = true; | ||
| });</Pre> | ||
| <p>@((MarkupString)Localizer["LocatorsProviderDesc3"].Value)</p> | ||
| <Pre>services.Configure<BootstrapBlazorOptions>(op => | ||
| { | ||
| op.WebClientOptions.EnableIpLocator = true; | ||
| });</Pre> | ||
|
|
||
| </section> | ||
| <GroupBox Title="@Localizer["GroupBoxTitle"]"> | ||
| <p class="code-label">@Localizer["IpLocatorFactoryDesc"] <a href="locator" target="_blank">IpLocatorFactory</a></p> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,9 @@ Location = await provider.Locate(Ip);</Pre> | |
| <p><code>183.160.236.53</code> @Localizer["LocatorsNormalTips4"]</p> | ||
|
|
||
| <DemoBlock Title="@Localizer["LocatorsNormalTitle"]" Introduction="@Localizer["LocatorsNormalIntro"]" Name="Normal"> | ||
| <section ignore> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: Non-standard 'ignore' attribute used on If this attribute is for custom processing, confirm it's properly supported. Otherwise, it will be ignored by browsers and could be misleading. |
||
| @((MarkupString)Localizer["LocatorsProviderDesc"].Value) | ||
| </section> | ||
| <div class="row g-3 form-inline"> | ||
| <div class="col-12 col-sm-6"> | ||
| <Select Items="_providers" Value="@ProviderName" OnValueChanged="OnProviderNameChanged" ShowLabel="true" DisplayText="LocatorProvider"> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: The use of the 'ignore' attribute on
If 'ignore' is required for a custom directive or framework, confirm it is properly supported; otherwise, consider removing it to maintain HTML standards compliance.