mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2025-12-06 07:28:50 +08:00
doc(HikVision): add HikVision component (#7248)
* chore: 增加映射 * feat: 增加海康摄像头服务 * doc: 增加示例文档 * chore: 增加示例文档 * chore: 增加海康摄像头依赖 * doc: 移除插件 * doc: 增加多语言支持 * doc: 更新菜单多语言 * doc: 更新键值 * doc: 增加用户名与密码
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
<PackageReference Include="BootstrapBlazor.FluentSystemIcon" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.FontAwesome" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.Gantt" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.HikVision" Version="10.0.0-beta01" />
|
||||
<PackageReference Include="BootstrapBlazor.Holiday" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.Html2Image" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.Html2Pdf" Version="10.0.0" />
|
||||
|
||||
@@ -5,7 +5,22 @@
|
||||
|
||||
<h4>@Localizer["SubTitle"]</h4>
|
||||
|
||||
<div id="divPlugin" class="plugin"></div>
|
||||
|
||||
<DemoBlock Title="@Localizer["BasicUsageTitle"]" Introduction="@Localizer["BasicUsageIntro"]" Name="Normal">
|
||||
<HikVision @ref="_hikVision"></HikVision>
|
||||
<section ignore>
|
||||
<BootstrapInput @bind-Value="@_userName"></BootstrapInput>
|
||||
<BootstrapPassword @bind-Value="@_password"></BootstrapPassword>
|
||||
<Button OnClickWithoutRender="OnLogin">
|
||||
<span>登录</span>
|
||||
</Button>
|
||||
<Button OnClickWithoutRender="OnLogout">
|
||||
<span>退出</span>
|
||||
</Button>
|
||||
<Button OnClickWithoutRender="OnStartRealPlay">
|
||||
<span>开始预览</span>
|
||||
</Button>
|
||||
<Button OnClickWithoutRender="OnStopRealPlay">
|
||||
<span>停止预览</span>
|
||||
</Button>
|
||||
</section>
|
||||
</DemoBlock>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
|
||||
|
||||
|
||||
namespace BootstrapBlazor.Server.Components.Samples;
|
||||
|
||||
/// <summary>
|
||||
@@ -11,21 +10,28 @@ namespace BootstrapBlazor.Server.Components.Samples;
|
||||
/// </summary>
|
||||
public partial class HikVisions
|
||||
{
|
||||
[Inject, NotNull]
|
||||
private IHikVision? HikVision { get; set; }
|
||||
private HikVision _hikVision = default!;
|
||||
|
||||
/// <summary>
|
||||
/// <inheritdoc/>
|
||||
/// </summary>
|
||||
/// <param name="firstRender"></param>
|
||||
/// <returns></returns>
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
private string _password = "";
|
||||
private string _userName = "admin";
|
||||
|
||||
private async Task OnLogin()
|
||||
{
|
||||
await base.OnAfterRenderAsync(firstRender);
|
||||
await _hikVision.Login("47.121.113.151", 9980, _userName, _password, LoginType.Http);
|
||||
}
|
||||
|
||||
if (firstRender)
|
||||
{
|
||||
await HikVision.Login("47.121.113.151", 9980, "admin", "vhbn8888");
|
||||
}
|
||||
private async Task OnLogout()
|
||||
{
|
||||
await _hikVision.Logout();
|
||||
}
|
||||
|
||||
private async Task OnStartRealPlay()
|
||||
{
|
||||
await _hikVision.StartRealPlay();
|
||||
}
|
||||
|
||||
private async Task OnStopRealPlay()
|
||||
{
|
||||
await _hikVision.StopRealPlay();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ internal static class MenusLocalizerExtensions
|
||||
new()
|
||||
{
|
||||
IsNew = true,
|
||||
Text = Localizer["HiKVision"],
|
||||
Text = Localizer["HikVision"],
|
||||
Url = "hik-vision"
|
||||
},
|
||||
new()
|
||||
|
||||
@@ -4800,7 +4800,8 @@
|
||||
"Dom2ImageService": "Dom2HtmlService",
|
||||
"SelectRegion": "Region Selector",
|
||||
"SelectProvince": "Province Selector",
|
||||
"SelectCity": "City Selector"
|
||||
"SelectCity": "City Selector",
|
||||
"HikVision": "HikVision"
|
||||
},
|
||||
"BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": {
|
||||
"TablesHeaderTitle": "Header grouping function",
|
||||
@@ -7170,5 +7171,11 @@
|
||||
"ProvinceNormalIntro": "Select the province from the drop-down box",
|
||||
"ProvinceMultipleTitle": "Multiple",
|
||||
"ProvinceMultipleIntro": "Enable multiple selection mode by setting <code>IsMultiple</code>"
|
||||
},
|
||||
"BootstrapBlazor.Server.Components.Samples.HikVisions": {
|
||||
"Title": "HikVision",
|
||||
"SubTitle": "",
|
||||
"BasicUsageTitle": "Basic usage",
|
||||
"BasicUsageIntro": "Operations are performed by calling the <code>HikVision</code> component instance method."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2000,7 +2000,7 @@
|
||||
"IsVirtualizeIntro": "通过设置 <code>IsVirtualize</code> 参数开启组件虚拟功能特性",
|
||||
"IsVirtualizeDescription": "组件虚拟滚动支持两种形式通过 <code>Items</code> 或者 <code>OnQueryAsync</code> 回调方法提供数据",
|
||||
"AttrIsVirtualize": "是否开启虚拟滚动",
|
||||
"AttIsAutoClearWhenInvalid":"焦点移除组件时是否自动清空无效值"
|
||||
"AttIsAutoClearWhenInvalid": "焦点移除组件时是否自动清空无效值"
|
||||
},
|
||||
"BootstrapBlazor.Server.Components.Samples.AutoCompletes": {
|
||||
"Title": "AutoComplete 自动完成",
|
||||
@@ -4800,7 +4800,8 @@
|
||||
"Dom2ImageService": "节点转图片服务 Dom2HtmlService",
|
||||
"SelectRegion": "行政区域选择器 SelectRegion",
|
||||
"SelectProvince": "省选择器 SelectProvince",
|
||||
"SelectCity": "城市选择器 SelectCity"
|
||||
"SelectCity": "城市选择器 SelectCity",
|
||||
"HikVision": "海康摄像头 HikVision"
|
||||
},
|
||||
"BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": {
|
||||
"TablesHeaderTitle": "表头分组功能",
|
||||
@@ -7170,5 +7171,11 @@
|
||||
"ProvinceNormalIntro": "通过下拉框的形式选择省/直辖市/特别行政区",
|
||||
"ProvinceMultipleTitle": "多选",
|
||||
"ProvinceMultipleIntro": "通过设置 <code>IsMultiple</code> 开启多选模式"
|
||||
},
|
||||
"BootstrapBlazor.Server.Components.Samples.HikVisions": {
|
||||
"Title": "HikVision 海康摄像头",
|
||||
"SubTitle": "",
|
||||
"BasicUsageTitle": "基本用法",
|
||||
"BasicUsageIntro": "通过调用 <code>HikVision</code> 组件实例方法进行操作"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user