From f21ac53fa001d35e15a5751806cd855c5a411ee0 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 16 May 2025 17:13:32 +0800 Subject: [PATCH] Upgarde to ABP 9.1.3&Antblazor 1.4.0 --- common.props | 2 +- .../BlazorServerComponentBundleManager.cs | 2 +- .../Layout/AbpPageHeader.razor | 2 +- .../PageToolbars/PageToolbarExtensions.cs | 2 +- .../Themes/AntDesignTheme/DefaultLayout.razor | 8 +++--- .../Themes/AntDesignTheme/MainMenuItem.razor | 4 +-- .../Pages/RoleNameComponent.razor | 4 +-- .../src/BookStore.BlazorServer/yarn.lock | 11 +++----- ....cs => 20250516090951_initial.Designer.cs} | 25 +++++++++++++------ ...5_Initial.cs => 20250516090951_initial.cs} | 9 ++++--- .../BookStoreDbContextModelSnapshot.cs | 21 ++++++++++++---- .../AntDesignUiNotificationService.cs | 2 +- ...UiObjectExtensionPropertyInfoExtensions.cs | 25 ++++++++++--------- .../Components/AbpExtensibleDataGrid.razor | 14 +++++------ .../Components/EntityAction.razor.cs | 2 +- .../Components/EntityActions.razor.cs | 2 +- .../Components/PageAlert.razor | 9 +++++-- .../Components/ToolbarButton.razor | 2 +- 18 files changed, 86 insertions(+), 60 deletions(-) rename samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/{20240706082705_Initial.Designer.cs => 20250516090951_initial.Designer.cs} (99%) rename samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/{20240706082705_Initial.cs => 20250516090951_initial.cs} (99%) diff --git a/common.props b/common.props index 6e14901..437c6eb 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 0.9.6 + 0.9.7 https://raw.githubusercontent.com/realliangshiwei/Lsw.Abp.AntDesignUI/main/icon.png https://github.com/realLiangshiwei/Lsw.Abp.AntDesignUI MIT diff --git a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorServerComponentBundleManager.cs b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorServerComponentBundleManager.cs index 684e3c0..790677c 100644 --- a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorServerComponentBundleManager.cs +++ b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorServerComponentBundleManager.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Bundling; -using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Bundling; using Volo.Abp.DependencyInjection; namespace Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling; diff --git a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/AbpPageHeader.razor b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/AbpPageHeader.razor index 1b41614..73c3d15 100644 --- a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/AbpPageHeader.razor +++ b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/AbpPageHeader.razor @@ -29,7 +29,7 @@ @if (Options.Value.RenderToolbar) { - + @if (Toolbar == null) { @ChildContent diff --git a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/PageToolbars/PageToolbarExtensions.cs b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/PageToolbars/PageToolbarExtensions.cs index f5186e9..5b46c88 100644 --- a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/PageToolbars/PageToolbarExtensions.cs +++ b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/PageToolbars/PageToolbarExtensions.cs @@ -46,7 +46,7 @@ public static class PageToolbarExtensions string text, Func clicked, object icon = null, - string color = ButtonType.Primary, + ButtonType color = ButtonType.Primary, bool disabled = false, int order = 0, string requiredPolicyName = null) diff --git a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor index 01ce330..17ea651 100644 --- a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor +++ b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor @@ -10,7 +10,7 @@
- +
@@ -42,15 +42,15 @@ else
@if (Collapsed) { - + } else { - + }
- + diff --git a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/MainMenuItem.razor b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/MainMenuItem.razor index a90550e..a5d9ce5 100644 --- a/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/MainMenuItem.razor +++ b/modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/MainMenuItem.razor @@ -10,7 +10,7 @@ @if (!Menu.Icon.IsNullOrWhiteSpace()) { - + } @Menu.DisplayName @@ -33,7 +33,7 @@ return @ @if (!Menu.Icon.IsNullOrWhiteSpace()) { - + } @menu.DisplayName ; diff --git a/modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleNameComponent.razor b/modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleNameComponent.razor index 11459f9..999207a 100644 --- a/modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleNameComponent.razor +++ b/modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleNameComponent.razor @@ -9,14 +9,14 @@ @if (Data.As().IsDefault) { } @if (Data.As().IsPublic) { } diff --git a/samples/BookStore/src/BookStore.BlazorServer/yarn.lock b/samples/BookStore/src/BookStore.BlazorServer/yarn.lock index c948dfe..607175e 100644 --- a/samples/BookStore/src/BookStore.BlazorServer/yarn.lock +++ b/samples/BookStore/src/BookStore.BlazorServer/yarn.lock @@ -213,11 +213,6 @@ resolved "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.1.tgz" integrity sha512-ALIk/MOh5gYe1TG/ieS5mVUsk7VUIJTJKPMK9rFFqOgfp0Q3d5QiBXbcOMwUvs37fyZVCz46YjOE6IFeOAXCHA== -"@popperjs/core@^2.11.8": - version "2.11.8" - resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz" - integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== - ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" @@ -251,7 +246,7 @@ datatables.net-bs5@^2.1.8: datatables.net "2.1.8" jquery ">=1.7" -datatables.net@^2.1.8, datatables.net@2.1.8: +datatables.net@2.1.8, datatables.net@^2.1.8: version "2.1.8" resolved "https://registry.npmjs.org/datatables.net/-/datatables.net-2.1.8.tgz" integrity sha512-47ULt+U4bcjbuGTpTlT6SnCuSFVRBxxdWa6X3NfvTObBJ2BZU0o+JUIl05wQ6cABNIavjbAV51gpgvFsMHL9zA== @@ -278,12 +273,12 @@ jquery-validation-unobtrusive@^4.0.0: jquery "^3.6.0" jquery-validation ">=1.19" -jquery-validation@^1.21.0, jquery-validation@>=1.19: +jquery-validation@>=1.19, jquery-validation@^1.21.0: version "1.21.0" resolved "https://registry.npmjs.org/jquery-validation/-/jquery-validation-1.21.0.tgz" integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== -"jquery@^1.7 || ^2.0 || ^3.1", jquery@^3.6.0, jquery@>=1.10, jquery@>=1.12.0, "jquery@>=1.5.0 <4.0", jquery@>=1.7, jquery@>=1.7.2, "jquery@>=3.4.0 <4.0.0", jquery@~3.7.1: +jquery@>=1.10, jquery@>=1.12.0, "jquery@>=1.5.0 <4.0", jquery@>=1.7, jquery@>=1.7.2, "jquery@>=3.4.0 <4.0.0", jquery@^3.6.0, jquery@~3.7.1: version "3.7.1" resolved "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== diff --git a/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20240706082705_Initial.Designer.cs b/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.Designer.cs similarity index 99% rename from samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20240706082705_Initial.Designer.cs rename to samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.Designer.cs index 015ce0a..6a1fa45 100644 --- a/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20240706082705_Initial.Designer.cs +++ b/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.Designer.cs @@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore; namespace BookStore.Migrations { [DbContext(typeof(BookStoreDbContext))] - [Migration("20240706082705_Initial")] - partial class Initial + [Migration("20250516090951_initial")] + partial class initial { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -22,7 +22,7 @@ namespace BookStore.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("ProductVersion", "9.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -484,6 +484,10 @@ namespace BookStore.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + b.Property("Description") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); @@ -558,6 +562,10 @@ namespace BookStore.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + b.Property("EntityVersion") .HasColumnType("int"); @@ -721,9 +729,13 @@ namespace BookStore.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + b.Property("IpAddresses") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.Property("LastAccessed") .HasColumnType("datetime2"); @@ -1807,8 +1819,7 @@ namespace BookStore.Migrations .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property("Expiration") - .IsRequired() + b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") diff --git a/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20240706082705_Initial.cs b/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.cs similarity index 99% rename from samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20240706082705_Initial.cs rename to samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.cs index c73d0c6..db3c47c 100644 --- a/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20240706082705_Initial.cs +++ b/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace BookStore.Migrations { /// - public partial class Initial : Migration + public partial class initial : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -78,6 +78,7 @@ namespace BookStore.Migrations RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), ValueType = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) }, @@ -243,6 +244,7 @@ namespace BookStore.Migrations IsStatic = table.Column(type: "bit", nullable: false), IsPublic = table.Column(type: "bit", nullable: false), EntityVersion = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) }, @@ -287,9 +289,10 @@ namespace BookStore.Migrations TenantId = table.Column(type: "uniqueidentifier", nullable: true), UserId = table.Column(type: "uniqueidentifier", nullable: false), ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IpAddresses = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + IpAddresses = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), SignedIn = table.Column(type: "datetime2", nullable: false), - LastAccessed = table.Column(type: "datetime2", nullable: true) + LastAccessed = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { diff --git a/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/BookStoreDbContextModelSnapshot.cs b/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/BookStoreDbContextModelSnapshot.cs index f3e47fd..91fd246 100644 --- a/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/BookStoreDbContextModelSnapshot.cs +++ b/samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/BookStoreDbContextModelSnapshot.cs @@ -19,7 +19,7 @@ namespace BookStore.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("ProductVersion", "9.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -481,6 +481,10 @@ namespace BookStore.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + b.Property("Description") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); @@ -555,6 +559,10 @@ namespace BookStore.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + b.Property("EntityVersion") .HasColumnType("int"); @@ -718,9 +726,13 @@ namespace BookStore.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + b.Property("IpAddresses") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.Property("LastAccessed") .HasColumnType("datetime2"); @@ -1804,8 +1816,7 @@ namespace BookStore.Migrations .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property("Expiration") - .IsRequired() + b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") diff --git a/src/Lsw.Abp.AntDesignUI/AntDesignUiNotificationService.cs b/src/Lsw.Abp.AntDesignUI/AntDesignUiNotificationService.cs index 6b891c5..6ab57c7 100644 --- a/src/Lsw.Abp.AntDesignUI/AntDesignUiNotificationService.cs +++ b/src/Lsw.Abp.AntDesignUI/AntDesignUiNotificationService.cs @@ -57,7 +57,7 @@ public class AntDesignUiNotificationService: IUiNotificationService, IScopedDepe protected virtual async Task Notify(string title, string message, MessageType messageType) { - await MessageService.Open(new MessageConfig + await MessageService.OpenAsync(new MessageConfig { Content = message, Type = messageType diff --git a/src/Lsw.Abp.AntDesignUI/AntDesignUiObjectExtensionPropertyInfoExtensions.cs b/src/Lsw.Abp.AntDesignUI/AntDesignUiObjectExtensionPropertyInfoExtensions.cs index e75b2e8..5264381 100644 --- a/src/Lsw.Abp.AntDesignUI/AntDesignUiObjectExtensionPropertyInfoExtensions.cs +++ b/src/Lsw.Abp.AntDesignUI/AntDesignUiObjectExtensionPropertyInfoExtensions.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; +using AntDesign; using Lsw.Abp.AntDesignUI.Components.ObjectExtending; using Volo.Abp.ObjectExtending; using Volo.Abp.Reflection; @@ -83,22 +84,22 @@ public static class AntDesignUiObjectExtensionPropertyInfoExtensions return (T)value; } - public static string GetTextInputMode(this ObjectExtensionPropertyInfo propertyInfo) + public static InputType GetTextInputMode(this ObjectExtensionPropertyInfo propertyInfo) { foreach (var attribute in propertyInfo.Attributes) { var textRoleByAttribute = GetTextInputModeFromAttributeOrNull(attribute); if (textRoleByAttribute != null) { - return textRoleByAttribute; + return textRoleByAttribute.Value; } } return GetTextInputModeFromTypeOrNull(propertyInfo.Type) - ?? "text"; //default + ?? InputType.Text; //default } - private static string GetTextInputModeFromTypeOrNull(Type type) + private static InputType? GetTextInputModeFromTypeOrNull(Type type) { // if (TypeHelper.IsFloatingType(type)) // { @@ -107,28 +108,28 @@ public static class AntDesignUiObjectExtensionPropertyInfoExtensions if (NumberTypes.Contains(type)) { - return "number"; + return InputType.Number; } return null; } - private static string GetTextInputModeFromAttributeOrNull(Attribute attribute) + private static InputType? GetTextInputModeFromAttributeOrNull(Attribute attribute) { if (attribute is EmailAddressAttribute) { - return "email"; + return InputType.Email; } if (attribute is UrlAttribute) { - return "url"; + return InputType.Url; } if (attribute is PhoneAttribute) { - return "tel"; + return InputType.Tel; } if (attribute is DataTypeAttribute dataTypeAttribute) @@ -136,11 +137,11 @@ public static class AntDesignUiObjectExtensionPropertyInfoExtensions switch (dataTypeAttribute.DataType) { case DataType.EmailAddress: - return "email"; + return InputType.Email; case DataType.Url: - return "url"; + return InputType.Url; case DataType.PhoneNumber: - return "tel"; + return InputType.Tel; } } diff --git a/src/Lsw.Abp.AntDesignUI/Components/AbpExtensibleDataGrid.razor b/src/Lsw.Abp.AntDesignUI/Components/AbpExtensibleDataGrid.razor index 9ff6def..6b85b10 100644 --- a/src/Lsw.Abp.AntDesignUI/Components/AbpExtensibleDataGrid.razor +++ b/src/Lsw.Abp.AntDesignUI/Components/AbpExtensibleDataGrid.razor @@ -20,14 +20,14 @@ { if (column.Actions.Any()) { - + @foreach (var action in column.Actions) { if (action.ConfirmationMessage != null) { + } else { - + } } else diff --git a/src/Lsw.Abp.AntDesignUI/Components/EntityAction.razor.cs b/src/Lsw.Abp.AntDesignUI/Components/EntityAction.razor.cs index dd43c7d..c0c0afd 100644 --- a/src/Lsw.Abp.AntDesignUI/Components/EntityAction.razor.cs +++ b/src/Lsw.Abp.AntDesignUI/Components/EntityAction.razor.cs @@ -24,7 +24,7 @@ public partial class EntityAction : ComponentBase public string Icon { get; set; } [Parameter] - public string Color { get; set; } = ButtonType.Default; + public ButtonType Color { get; set; } = ButtonType.Default; [Parameter] public bool Primary { get; set; } diff --git a/src/Lsw.Abp.AntDesignUI/Components/EntityActions.razor.cs b/src/Lsw.Abp.AntDesignUI/Components/EntityActions.razor.cs index 9157fe0..ccbf019 100644 --- a/src/Lsw.Abp.AntDesignUI/Components/EntityActions.razor.cs +++ b/src/Lsw.Abp.AntDesignUI/Components/EntityActions.razor.cs @@ -23,7 +23,7 @@ public partial class EntityActions : ComponentBase public bool Disabled { get; set; } = false; [Parameter] - public string ToggleColor { get; set; } = ButtonType.Primary; + public ButtonType ToggleColor { get; set; } = ButtonType.Primary; [Parameter] public string ToggleText { get; set; } diff --git a/src/Lsw.Abp.AntDesignUI/Components/PageAlert.razor b/src/Lsw.Abp.AntDesignUI/Components/PageAlert.razor index b00150f..2d87522 100644 --- a/src/Lsw.Abp.AntDesignUI/Components/PageAlert.razor +++ b/src/Lsw.Abp.AntDesignUI/Components/PageAlert.razor @@ -1,10 +1,11 @@ @using Volo.Abp.AspNetCore.Components.Alerts @using System.Collections.Specialized @using Microsoft.AspNetCore.Components.Routing +@using AlertType = AntDesign.AlertType @foreach (var message in _messages) { - (message.Type.ToString()); + } } diff --git a/src/Lsw.Abp.AntDesignUI/Components/ToolbarButton.razor b/src/Lsw.Abp.AntDesignUI/Components/ToolbarButton.razor index 62591eb..e5f8556 100644 --- a/src/Lsw.Abp.AntDesignUI/Components/ToolbarButton.razor +++ b/src/Lsw.Abp.AntDesignUI/Components/ToolbarButton.razor @@ -9,7 +9,7 @@ @code { [Parameter] - public string Color { get; set; } = ButtonType.Default; + public ButtonType Color { get; set; } = ButtonType.Default; [Parameter] public string Icon { get; set; }