From ef8f0d0bd79ab8d6086faa560069907177b3e711 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sun, 25 Sep 2022 21:21:55 +0800 Subject: [PATCH 01/24] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Button/PopConfirmButtonBase.cs | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs b/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs index 44598e686..32d84868a 100644 --- a/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs +++ b/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs @@ -43,7 +43,8 @@ public abstract class PopConfirmButtonBase : ButtonBase /// 获得/设置 点击确认弹窗前回调方法 返回真时弹出弹窗 返回假时不弹出 /// [Parameter] - public Func> OnBeforeClick { get; set; } = () => Task.FromResult(true); + [NotNull] + public Func>? OnBeforeClick { get; set; } /// /// 获得/设置 显示标题 @@ -78,10 +79,11 @@ public abstract class PopConfirmButtonBase : ButtonBase public Color ConfirmButtonColor { get; set; } = Color.Primary; /// - /// 获得/设置 确认框图标 + /// 获得/设置 确认框图标 默认 "fa-solid fa-circle-exclamation text-info" /// [Parameter] - public string ConfirmIcon { get; set; } = "fa-solid fa-circle-exclamation text-info"; + [NotNull] + public string? ConfirmIcon { get; set; } /// /// @@ -92,4 +94,20 @@ public abstract class PopConfirmButtonBase : ButtonBase /// /// protected string? ElementType => IsLink ? null : "button"; + + /// + /// + /// + protected string? PlacementString => Placement == Placement.Auto ? null : Placement.ToDescriptionString(); + + /// + /// OnInitialized 方法 + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + ConfirmIcon ??= "fa-solid fa-circle-exclamation text-info"; + OnBeforeClick ??= () => Task.FromResult(true); + } } -- Gitee From b595698f22b3291d8b691a702dcdd6a852437b23 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Mon, 26 Sep 2022 10:47:14 +0800 Subject: [PATCH 02/24] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=20NotNull?= =?UTF-8?q?=20=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs b/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs index ae2e07045..93a97d8c9 100644 --- a/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs +++ b/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs @@ -13,6 +13,7 @@ public abstract class IdComponentBase : BootstrapComponentBase /// 获得/设置 组件 id 属性 /// [Parameter] + [NotNull] public virtual string? Id { get; set; } [Inject] -- Gitee From 6009d24007e662b24a11517d035e6693f62a1cd2 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Mon, 26 Sep 2022 10:51:03 +0800 Subject: [PATCH 03/24] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=20bb.popov?= =?UTF-8?q?er=20=E8=87=AA=E5=AE=9A=E4=B9=89=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/DateTimePicker/DateTimePicker.razor | 2 +- .../Components/DateTimeRange/DateTimeRange.razor | 2 +- src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs | 2 +- .../wwwroot/lib/extensions/longbow.component.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor index b335e7665..665ac9942 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor +++ b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor @@ -7,7 +7,7 @@ }
- + }
-