Skip to content

Commit ee28d98

Browse files
committed
Merge branch 'main' into refactor-table
2 parents 602e04a + 10a6739 commit ee28d98

File tree

100 files changed

+2282
-2148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2282
-2148
lines changed

.fork/custom-commands.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[
2+
{
3+
"version" : 2
4+
},
5+
{
6+
"action" : {
7+
"script" : "git branch -d localBranchName\ngit push gitee.com --delete refs/heads/${ref}",
8+
"showOutput" : false,
9+
"type" : "sh",
10+
"waitForExit" : true
11+
},
12+
"name" : "Delete All Branch",
13+
"refTargets" : [
14+
"localbranch",
15+
"remotebranch"
16+
],
17+
"target" : "ref"
18+
},
19+
{
20+
"action" : {
21+
"script" : "git push origin ${ref}\ngit push gitee.com ${ref}",
22+
"showOutput" : false,
23+
"type" : "sh",
24+
"waitForExit" : true
25+
},
26+
"name" : "Push All Branch",
27+
"refTargets" : [
28+
"localbranch"
29+
],
30+
"target" : "ref"
31+
}
32+
]

.github/workflows/build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13-
13+
1414
steps:
1515
- uses: actions/checkout@v4
1616

@@ -20,7 +20,7 @@ jobs:
2020
dotnet-version: 9.0.x
2121

2222
- name: Build
23-
env:
23+
env:
2424
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
2525
Bundle: True
2626
run: |
@@ -35,3 +35,11 @@ jobs:
3535
uses: codecov/codecov-action@v4
3636
with:
3737
token: ${{ secrets.CODECOV_TOKEN }}
38+
39+
- name: Check Router
40+
run: |
41+
dotnet test test/UnitTestDocs
42+
43+
- name: Check Localizer
44+
run: |
45+
dotnet test test/UnitTest.Localization

.github/workflows/close-stale-issues.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/BootstrapBlazor.Server/Components/Components/BlazorReconnector.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<div class="d-flex">
6868
<div class="flex-fill">
6969
<p>一套基于 <b>Bootstrap</b> 样式的企业级 <b>Blazor UI</b> 组件库,支持 ServerWebAssembly</p>
70-
<p>适配移动端支持各种主流浏览器以及移动端,适配 <b>ABP</b>,同时支持 <b>NET6/NET7/NET8</b></p>
70+
<p>适配移动端支持各种主流浏览器以及移动端,适配 <b>ABP</b>,同时支持 <b>NET6/NET7/NET8/NET9</b></p>
7171
<p></p>
7272
<div>已提供项目模板方便快速上手 <a class="connection-link" href="@TemplateUrl" target="_blank">项目模板</a></div>
7373
</div>
Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,10 @@
11
@inherits FilterBase
22

3-
<Select Items="@Items" @bind-Value="@Value" OnSelectedItemChanged="_ => OnFilterValueChanged()"></Select>
3+
@if (IsHeaderRow)
4+
{
45

5-
@code {
6-
private int Value = 10;
7-
8-
/// <summary>
9-
/// OnInitialized 方法
10-
/// </summary>
11-
protected override void OnInitialized()
12-
{
13-
base.OnInitialized();
14-
15-
if (TableFilter != null) TableFilter.ShowMoreButton = false;
16-
17-
Items = new SelectedItem[]
18-
{
19-
new SelectedItem { Value = "10", Text = "大于 10" },
20-
new SelectedItem { Value = "50", Text = "大于 50" },
21-
new SelectedItem { Value = "100", Text = "大于 100" }
22-
};
23-
}
24-
25-
/// <summary>
26-
/// 重置过滤条件方法
27-
/// </summary>
28-
public override void Reset()
29-
{
30-
Value = 10;
31-
32-
StateHasChanged();
33-
}
34-
35-
/// <summary>
36-
/// 生成过滤条件方法
37-
/// </summary>
38-
/// <returns></returns>
39-
public override FilterKeyValueAction GetFilterConditions()
40-
{
41-
var filter = new FilterKeyValueAction() { Filters = new() };
42-
filter.Filters.Add(new FilterKeyValueAction()
43-
{
44-
FieldKey = FieldKey,
45-
FieldValue = Value,
46-
FilterAction = FilterAction.GreaterThan
47-
});
48-
return filter;
49-
}
6+
}
7+
else
8+
{
9+
<Select Items="@_items" @bind-Value="@Value"></Select>
5010
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the Apache 2.0 License
3+
// See the LICENSE file in the project root for more information.
4+
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
5+
6+
namespace BootstrapBlazor.Server.Components.Components;
7+
8+
/// <summary>
9+
///
10+
/// </summary>
11+
public partial class CustomerFilter
12+
{
13+
private int? Value;
14+
15+
private readonly IEnumerable<SelectedItem> _items = new SelectedItem[]
16+
{
17+
new() { Value = "", Text = "请选择 ..." },
18+
new() { Value = "10", Text = "大于 10" },
19+
new() { Value = "50", Text = "大于 50" },
20+
new() { Value = "80", Text = "大于 80" }
21+
};
22+
23+
/// <summary>
24+
/// 重置过滤条件方法
25+
/// </summary>
26+
public override void Reset()
27+
{
28+
Value = null;
29+
StateHasChanged();
30+
}
31+
32+
/// <summary>
33+
/// 生成过滤条件方法
34+
/// </summary>
35+
/// <returns></returns>
36+
public override FilterKeyValueAction GetFilterConditions()
37+
{
38+
var filter = new FilterKeyValueAction();
39+
if (Value != null)
40+
{
41+
filter.Filters.Add(new FilterKeyValueAction()
42+
{
43+
FieldKey = FieldKey,
44+
FieldValue = Value.Value,
45+
FilterAction = FilterAction.GreaterThan
46+
});
47+
}
48+
return filter;
49+
}
50+
}

src/BootstrapBlazor.Server/Components/Samples/Inputs.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224

225225
<DemoBlock Title="@Localizer["ClearableTitle"]"
226226
Introduction="@Localizer["ClearableIntro"]"
227-
Name="OnInput">
227+
Name="IsClearable">
228228
<div class="row g-3">
229229
<div class="col-12 col-sm-6">
230230
<BootstrapInput Value="Model.Name" IsClearable="true" ShowLabel="true" DisplayText="Clearable" />

src/BootstrapBlazor.Server/Components/Samples/Messages.razor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ private MessageService? MessageService { get; set; }
2424
<Message @ref="Message" Placement="Placement.Bottom" />
2525
</DemoBlock>
2626

27+
<DemoBlock Title="@Localizer["MessagesAsyncTitle"]" Introduction="@Localizer["MessagesAsyncIntro"]" Name="Async">
28+
<Button IsAsync="true" OnClick="@ShowAsyncMessage" Text="@Localizer["MessagesAsyncText"]"></Button>
29+
</DemoBlock>
30+
2731
<DemoBlock Title="@Localizer["MessagesIconTitle"]" Introduction="@Localizer["MessagesIconIntro"]" Name="Icon">
2832
<button class="btn btn-primary" @onclick="@ShowIconMessage">@Localizer["MessagesMessagePrompt"]</button>
2933
</DemoBlock>

src/BootstrapBlazor.Server/Components/Samples/Messages.razor.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public sealed partial class Messages
1616
[NotNull]
1717
private Message? Message1 { get; set; }
1818

19+
private readonly MessageOption _option = new();
20+
1921
private async Task ShowMessage()
2022
{
2123
Message.SetPlacement(Placement.Top);
@@ -25,6 +27,28 @@ await MessageService.Show(new MessageOption()
2527
});
2628
}
2729

30+
private async Task ShowAsyncMessage()
31+
{
32+
_option.ForceDelay = true;
33+
_option.IsAutoHide = false;
34+
_option.Delay = 3000;
35+
_option.Content = Localizer["MessagesAsyncDemoStep1Text"];
36+
_option.Color = Color.Info;
37+
await MessageService.Show(_option);
38+
39+
await Task.Delay(3000);
40+
_option.Content = Localizer["MessagesAsyncDemoStep2Text"];
41+
_option.IsAutoHide = true;
42+
_option.Color = Color.Info;
43+
await MessageService.Show(_option);
44+
45+
await Task.Delay(2000);
46+
_option.Content = Localizer["MessagesAsyncDemoStep3Text"];
47+
_option.Color = Color.Success;
48+
49+
await MessageService.Show(_option);
50+
}
51+
2852
private async Task ShowIconMessage()
2953
{
3054
await MessageService.Show(new MessageOption()

src/BootstrapBlazor.Server/Components/Samples/Reconnectors.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<div class="d-flex">
9898
<div class="flex-fill">
9999
<p>基于 <b>Bootstrap</b> 样式的 <b>Blazor UI</b> 组件库</p>
100-
<p>适配移动端支持各种主流浏览器,适配 <b>ABP</b>,同时支持 <b>NET6/NET7/NET8</b>,交流群 <b>795206915</b></p>
100+
<p>适配移动端支持各种主流浏览器,适配 <b>ABP</b>,同时支持 <b>NET6/NET7/NET8/NET9</b>,交流群 <b>795206915</b></p>
101101
<p>已提供项目模板方便快速上手 <a class="connection-link" href="@TemplateUrl">项目模板</a></p>
102102
</div>
103103
<div class="connection-body-tail d-none d-sm-block"></div>
@@ -126,7 +126,7 @@
126126
&lt;div class="d-flex"&gt;
127127
&lt;div class="flex-fill"&gt;
128128
&lt;div class="mb-2"&gt;基于 &lt;b&gt;Bootstrap&lt;/b&gt; 样式的 &lt;b&gt;Blazor UI&lt;/b&gt; 组件库&lt;/div&gt;
129-
&lt;div class="mb-2"&gt;适配移动端支持各种主流浏览器,适配 &lt;b&gt;ABP&lt;/b&gt;,同时支持 &lt;b&gt;NET6/NET7/NET8&lt;/b&gt;,交流群 &lt;b&gt;795206915&lt;/b&gt;&lt;/div&gt;
129+
&lt;div class="mb-2"&gt;适配移动端支持各种主流浏览器,适配 &lt;b&gt;ABP&lt;/b&gt;,同时支持 &lt;b&gt;NET6/NET7/NET8/NET9&lt;/b&gt;,交流群 &lt;b&gt;795206915&lt;/b&gt;&lt;/div&gt;
130130
&lt;div&gt;已提供项目模板方便快速上手 &lt;a class="connection-link" href="@TemplateUrl"&gt;项目模板&lt;/a&gt;&lt;/div&gt;
131131
&lt;/div&gt;
132132
&lt;div class="connection-body-tail d-none d-sm-block"&gt;&lt;/div&gt;
@@ -187,7 +187,7 @@
187187
&lt;div class="d-flex"&gt;
188188
&lt;div class="flex-fill"&gt;
189189
&lt;div class="mb-2"&gt;基于 &lt;b&gt;Bootstrap&lt;/b&gt; 样式的 &lt;b&gt;Blazor UI&lt;/b&gt; 组件库&lt;/div&gt;
190-
&lt;div class="mb-2"&gt;适配移动端支持各种主流浏览器,适配 &lt;b&gt;ABP&lt;/b&gt;,同时支持 &lt;b&gt;NET6/NET7/NET8&lt;/b&gt;,交流群 &lt;b&gt;795206915&lt;/b&gt;&lt;/div&gt;
190+
&lt;div class="mb-2"&gt;适配移动端支持各种主流浏览器,适配 &lt;b&gt;ABP&lt;/b&gt;,同时支持 &lt;b&gt;NET6/NET7/NET8/NET9&lt;/b&gt;,交流群 &lt;b&gt;795206915&lt;/b&gt;&lt;/div&gt;
191191
&lt;div&gt;已提供项目模板方便快速上手 &lt;a class="connection-link" href="@TemplateUrl"&gt;项目模板&lt;/a&gt;&lt;/div&gt;
192192
&lt;/div&gt;
193193
&lt;div class="connection-body-tail d-none d-sm-block"&gt;&lt;/div&gt;
@@ -248,7 +248,7 @@
248248
&lt;div class="d-flex"&gt;
249249
&lt;div class="flex-fill"&gt;
250250
&lt;div class="mb-2"&gt;基于 &lt;b&gt;Bootstrap&lt;/b&gt; 样式的 &lt;b&gt;Blazor UI&lt;/b&gt; 组件库&lt;/div&gt;
251-
&lt;div class="mb-2"&gt;适配移动端支持各种主流浏览器,适配 &lt;b&gt;ABP&lt;/b&gt;,同时支持 &lt;b&gt;NET6/NET7/NET8&lt;/b&gt;,交流群 &lt;b&gt;795206915&lt;/b&gt;&lt;/div&gt;
251+
&lt;div class="mb-2"&gt;适配移动端支持各种主流浏览器,适配 &lt;b&gt;ABP&lt;/b&gt;,同时支持 &lt;b&gt;NET6/NET7/NET8/NET9&lt;/b&gt;,交流群 &lt;b&gt;795206915&lt;/b&gt;&lt;/div&gt;
252252
&lt;div&gt;已提供项目模板方便快速上手 &lt;a class="connection-link" href="@TemplateUrl"&gt;项目模板&lt;/a&gt;&lt;/div&gt;
253253
&lt;/div&gt;
254254
&lt;div class="connection-body-tail d-none d-sm-block"&gt;&lt;/div&gt;

0 commit comments

Comments
 (0)