From ed637d5caad7367ef04895457868b619cc007100 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 11 Nov 2025 14:00:22 +0800 Subject: [PATCH 1/5] =?UTF-8?q?refactor:=20=E7=B2=BE=E7=AE=80=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/Directory.Build.props | 17 ++++++++++++---- test/UniTest.Sass/UniTest.Sass.csproj | 20 ------------------- .../UnitTest.Localization.csproj | 19 ++++++++---------- test/UnitTest/UnitTest.csproj | 19 ++++++++---------- test/UnitTestDocs/UnitTestDocs.csproj | 20 ------------------- 5 files changed, 29 insertions(+), 66 deletions(-) diff --git a/test/Directory.Build.props b/test/Directory.Build.props index d7452664327..6806e997142 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -9,11 +9,20 @@ - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + - diff --git a/test/UniTest.Sass/UniTest.Sass.csproj b/test/UniTest.Sass/UniTest.Sass.csproj index 2d959a0f4f7..61718a1f874 100644 --- a/test/UniTest.Sass/UniTest.Sass.csproj +++ b/test/UniTest.Sass/UniTest.Sass.csproj @@ -1,23 +1,3 @@ - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - diff --git a/test/UnitTest.Localization/UnitTest.Localization.csproj b/test/UnitTest.Localization/UnitTest.Localization.csproj index 353724a6184..e575f67ab61 100644 --- a/test/UnitTest.Localization/UnitTest.Localization.csproj +++ b/test/UnitTest.Localization/UnitTest.Localization.csproj @@ -1,4 +1,4 @@ - + @@ -9,16 +9,6 @@ - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - @@ -40,4 +30,11 @@ + + + + + + + diff --git a/test/UnitTest/UnitTest.csproj b/test/UnitTest/UnitTest.csproj index 89333e84506..a9648e62187 100644 --- a/test/UnitTest/UnitTest.csproj +++ b/test/UnitTest/UnitTest.csproj @@ -1,18 +1,8 @@ - + - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - @@ -58,4 +48,11 @@ + + + + + + + diff --git a/test/UnitTestDocs/UnitTestDocs.csproj b/test/UnitTestDocs/UnitTestDocs.csproj index 39f45675c3a..4ccdb4a5ec3 100644 --- a/test/UnitTestDocs/UnitTestDocs.csproj +++ b/test/UnitTestDocs/UnitTestDocs.csproj @@ -1,28 +1,10 @@ - - false - true - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - @@ -32,8 +14,6 @@ - - From 586d73d6830814784a0d2533908093f6a10dbe0c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 11 Nov 2025 14:04:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E4=B8=BA=20net10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Version.props | 7 +------ src/BootstrapBlazor/BootstrapBlazor.csproj | 8 ++------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Version.props b/Version.props index d5e192cdc3a..a39d9af4200 100644 --- a/Version.props +++ b/Version.props @@ -1,11 +1,6 @@ - - net9.0 - net6.0;net7.0;net8.0;net9.0 - - - + net10.0 net6.0;net7.0;net8.0;net9.0;net10.0 diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index c64dd357097..59d168bf912 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,11 +1,7 @@ - - 9.12.2-beta03 - - - - 10.0.0-rc.2.2.5 + + 10.0.0 From d9dff4c5c11647a1a310183b1349c882f39524b8 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 11 Nov 2025 14:04:21 +0800 Subject: [PATCH 3/5] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E6=96=B9=E6=A1=88=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BootstrapBlazor.slnx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/BootstrapBlazor.slnx b/BootstrapBlazor.slnx index 661d0952e28..6ae2706fd52 100644 --- a/BootstrapBlazor.slnx +++ b/BootstrapBlazor.slnx @@ -9,10 +9,7 @@ - - - @@ -28,6 +25,11 @@ + + + + + @@ -55,12 +57,20 @@ + + + + + + + + From e6a99ace9b849c7ef3cba17e4195cd9a41e0292d Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 11 Nov 2025 16:02:47 +0800 Subject: [PATCH 4/5] =?UTF-8?q?refactor:=20=E7=B2=BE=E7=AE=80=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/DateTimePicker/DatePickerBody.razor.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.scss b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.scss index 2b4b5921ea5..2b9d677cf59 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.scss +++ b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.scss @@ -1,4 +1,4 @@ -@use "../../wwwroot/scss/variables" as *; +@use "../../wwwroot/scss/variables" as *; .picker-panel { --bb-picker-panel-body-width: 320px; @@ -149,8 +149,8 @@ } &.current:not(.disabled), - &.start:not(.next-month):not(.prev-month):not(.disabled), - &.end:not(.next-month):not(.prev-month):not(.disabled) { + &.start:not(.disabled), + &.end:not(.disabled) { .cell { color: var(--bb-picker-panel-today-color); From 6a48f4d7d11e1c177446e65245d17c13e96d4e83 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 11 Nov 2025 16:03:06 +0800 Subject: [PATCH 5/5] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=B8=8D=E6=98=AF=E5=BD=93=E5=89=8D=E6=9C=88=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E4=B8=8D=E5=8F=82=E4=B8=8E=20Range?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DateTimePicker/DatePickerBody.razor.cs | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs index 9f1238d5018..a5984149495 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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(argo@live.ca) Website: https://www.blazor.zone @@ -57,16 +57,26 @@ private DateTime StartDate /// 获得/设置 日期样式 /// private string? GetDayClass(DateTime day, bool overflow) => CssBuilder.Default() - .AddClass("prev-month", day.Month < CurrentDate.Month) - .AddClass("next-month", day.Month > CurrentDate.Month) + .AddClass("prev-month", IsPrevMonth(day)) + .AddClass("next-month", IsNextMonth(day)) .AddClass("current", day.Date == SelectValue.Date && Ranger == null && day.Month == SelectValue.Month && !overflow) - .AddClass("start", Ranger != null && day == Ranger.SelectedValue.Start.Date) - .AddClass("end", Ranger != null && day == Ranger.SelectedValue.End.Date) - .AddClass("range", Ranger != null && day >= Ranger.SelectedValue.Start.Date && day <= Ranger.SelectedValue.End.Date) + .AddClass("start", Ranger != null && day == Ranger.SelectedValue.Start.Date && IsCurrentMonth(day)) + .AddClass("end", Ranger != null && day == Ranger.SelectedValue.End.Date && IsCurrentMonth(day)) + .AddClass("range", IsRange(day) && IsCurrentMonth(day)) .AddClass("today", day == DateTime.Today) .AddClass("disabled", IsDisabled(day) || overflow) .Build(); + private bool IsPrevMonth(DateTime day) => day.Month < CurrentDate.Month; + + private bool IsNextMonth(DateTime day) => day.Month > CurrentDate.Month; + + private bool IsCurrentMonth(DateTime day) => day.Month == CurrentDate.Month; + + private bool IsRange(DateTime day) => Ranger != null + && day >= Ranger.SelectedValue.Start.Date + && day <= Ranger.SelectedValue.End.Date; + private string? WrapperClassString => CssBuilder.Default("picker-panel-body-main-wrapper") .AddClass("is-open", _showClockPicker) .Build();