Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<PackageReference Include="BootstrapBlazor.PdfViewer" Version="9.0.6" />
<PackageReference Include="BootstrapBlazor.Player" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.RDKit" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.Region" Version="9.0.0" />
<PackageReference Include="BootstrapBlazor.Region" Version="9.0.1" />
<PackageReference Include="BootstrapBlazor.SignaturePad" Version="9.0.1" />
<PackageReference Include="BootstrapBlazor.SmilesDrawer" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.Sortable" Version="9.0.3" />
Expand Down
20 changes: 20 additions & 0 deletions src/BootstrapBlazor.Server/Components/Samples/SelectCities.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@page "/select-city"
@inject IStringLocalizer<SelectCities> Localizer

<h3>@Localizer["CityTitle"]</h3>

<h4>@Localizer["CityDescription"]</h4>

<PackageTips Name="BootstrapBlazor.Region" />

<DemoBlock Title="@Localizer["CityNormalTitle"]"
Introduction="@Localizer["CityNormalIntro"]"
Name="Normal">
<SelectCity Value="@_value"></SelectCity>
</DemoBlock>

<DemoBlock Title="@Localizer["CityMultipleTitle"]"
Introduction="@Localizer["CityMultipleIntro"]"
Name="IsMultiple">
<SelectCity IsMultiple="true" Value="@_value"></SelectCity>
</DemoBlock>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone

namespace BootstrapBlazor.Server.Components.Samples;

/// <summary>
/// 城市选择器示例
/// </summary>
public partial class SelectCities
{
private string _value = "";
}
19 changes: 12 additions & 7 deletions src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone

using Longbow.SerialPorts;
using Microsoft.AspNetCore.Components.Routing;

namespace BootstrapBlazor.Server.Extensions;
Expand Down Expand Up @@ -451,12 +450,6 @@ void AddForm(DemoMenuItem item)
Url = "floating-label"
},
new()
{
IsNew = true,
Text = Localizer["SelectRegion"],
Url = "select-region"
},
new()
{
Text = Localizer["ListGroup"],
Url = "list-group"
Expand Down Expand Up @@ -529,6 +522,18 @@ void AddForm(DemoMenuItem item)
Url = "select"
},
new()
{
IsNew = true,
Text = Localizer["SelectCity"],
Url = "select-city"
},
new()
{
IsNew = true,
Text = Localizer["SelectRegion"],
Url = "select-region"
},
new()
{
Text = Localizer["SelectObject"],
Url = "select-object"
Expand Down
11 changes: 10 additions & 1 deletion src/BootstrapBlazor.Server/Locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -4873,7 +4873,8 @@
"Navbar": "Navbar",
"TaskDashBoard": "TaskDashBoard",
"Dom2ImageService": "IDom2HtmlService",
"SelectRegion": "Region Selector"
"SelectRegion": "Region Selector",
"SelectCity": "City Selector"
},
"BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": {
"TablesHeaderTitle": "Header grouping function",
Expand Down Expand Up @@ -7227,5 +7228,13 @@
"RegionDescription": "A simple region cascade selector, provide 4 levels Chinese administrative division data",
"RegionNormalTitle": "Basic usage",
"RegionNormalIntro": "Use grouping to switch the selection mode for displaying administrative areas"
},
"BootstrapBlazor.Server.Components.Samples.SelectCities": {
"CityTitle": "City Selector",
"CityDescription": "Provides a city selector classified by province",
"CityNormalTitle": "Basic usage",
"CityNormalIntro": "Select a city from the drop-down box",
"CityMultipleTitle": "Multiple",
"CityMultipleIntro": "Enable multiple selection mode by setting <code>IsMultiple</code> , and all cities will be automatically selected when clicking a province in the pop-up window."
}
}
13 changes: 11 additions & 2 deletions src/BootstrapBlazor.Server/Locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -4873,7 +4873,8 @@
"Navbar": "导航栏 Navbar",
"TaskDashBoard": "任务管理器 TaskDashBoard",
"Dom2ImageService": "节点转图片服务 IDom2HtmlService",
"SelectRegion": "行政区域选择器 SelectRegion"
"SelectRegion": "行政区域选择器 SelectRegion",
"SelectCity": "城市选择器 SelectCity"
},
"BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": {
"TablesHeaderTitle": "表头分组功能",
Expand Down Expand Up @@ -7223,9 +7224,17 @@
"Dom2ImageFullText": "长截图"
},
"BootstrapBlazor.Server.Components.Samples.SelectRegions": {
"RegionTitle": "Region 行政区域选择器",
"RegionTitle": "SelectRegion 行政区域选择器",
"RegionDescription": "提供 4 级行政区划选择器",
"RegionNormalTitle": "基本用法",
"RegionNormalIntro": "使用分组切换显示行政区域的选择模式"
},
"BootstrapBlazor.Server.Components.Samples.SelectCities": {
"CityTitle": "SelectCity 城市选择器",
"CityDescription": "提供以省分类的城市选择器",
"CityNormalTitle": "基本用法",
"CityNormalIntro": "通过下拉框的形式选择城市",
"CityMultipleTitle": "多选",
"CityMultipleIntro": "通过设置 <code>IsMultiple</code> 开启多选模式,点击弹窗中省份时自动选中所有城市"
}
}
3 changes: 2 additions & 1 deletion src/BootstrapBlazor.Server/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@
"task-board": "TaskBoard",
"modbus-factory": "Modbus\\ModbusFactories",
"serial-port-factory": "SerialPorts\\SerialPortFactories",
"select-region": "Regions"
"select-region": "SelectRegions",
"select-city": "SelectCities"
},
"video": {
"table": "BV1ap4y1x7Qn?p=1",
Expand Down
Loading