Abp Vnext自带的blazor项目使用的是 Blazorise,但是试用后发现不支持多标签。于是想替换为BootstrapBlazor

过程比较复杂,本人已经把模块写好了只需要替换掉即可。

点击查看源码

demo也在源码里面

创建一个Abp模块

从官网下载

Q:为什么不选择应用程序?

因为模块中包含Blazor的ssr和Wasm的host。可以直接使用,而创建应用程序的话只能从ssr或wasm的host中二选一,虽然可以创建两次再把host复制合并但太麻烦了。

精简模块

删除以下无用目录:

  • angular(前端)
  • host/DemoApp.Web.Host (mvc使用)
  • host/DemoApp.Web.Unified (mvc使用)
  • host/DemoApp.Web (mvc使用)

项目结构与如何启动项目

  • IdentityServer应用程序是其他应用程序使用的身份验证服务器,它有自己的appsettings.json包含数据库连接字符串和其他配置,需要初始化数据库
  • HttpApi.Host托管模块的HTTP API. 它有自己的appsettings.json包含数据库连接字符串和其他配置

    先把项目跑起来
  • Blazor.HostBlazor WebAssembly模式的启动程序,它有自己的appsettings.json(位于wwwroot中)包含HTTP API服务器地址和IdentityServer等配置,前后端分离,需要先启动前面两个程序才能正常使用
  • Blazor.Server.HostBlazor Server模式的启动程序,它有自己的appsettings.json包含数据库连接字符串和其他配置,但是它内部默认集成了IdentityServer和HttpApi.Host模块,相当于前后端不分离,所以它可以直接用。

启动项目(WebAssembly模式)

因为项目默认数据库为MSSQLLocalDB所以不需要另外修改配置,直接初始化数据库即可。

首先在控制台中切换到DemoApp.IdentityServer项目所在目录,执行

  1. dotnet ef database update

按顺序打开如下项目:

  • DemoApp.IdentityServer
  • DemoApp.HttpApi.Host
  • DemoApp.Blazor.Host

打开https://localhost:44307/正常载入wasm页面,点击右上角登录会跳转到identityServer认证中心(https://localhost:44364/),输入用户名admin密码1q2w3E*登录完成跳转回wasm

启动项目(Server模式)

由于Server.Host默认集成了IdentityServer和HttpApi(需要改造,后文有)

初始化数据库

首先在控制台中切换到DemoApp.Blazor.Server.Host项目所在目录,执行

  1. dotnet ef database update

直接启动后打开https://localhost:44313/即可

可以看到登录的时候也是https://localhost:44313/,不像wasm一样会跳到identityserver(因为它自己就集成了)。

替换模块主题

DemoApp.Blazor

这是模块的Blazor公共项目,一般在这里面编写相关页面和组件

  1. 移除依赖Volo.Abp.AspNetCore.Components.Web.Theming,替换为Abp.AspNetCore.Blazor.Theme.Bootstrap
  2. 打开DemoAppBlazorModule

    2.1 把DependsOn中依赖的模块名AbpAspNetCoreComponentsWebThemingModule改为AbpAspNetCoreBlazorThemeBootstrapModule

    2.2 引用Abp.AspNetCore.Blazor.Theme.Bootstrap Abp.AspNetCore.Blazor.Theme命名空间
  3. 打开_Imports.razor,删除@using Volo.Abp.BlazoriseUI @using Blazorise @using Blazorise.DataGrid,添加@using BootstrapBlazor.Components @using Abp.AspNetCore.Blazor.Theme

DemoApp.Blazor.Server

这个是模块的ssr模式下引用的类库,这个简单,只需要替换依赖就行。

  1. 移除依赖Volo.Abp.AspNetCore.Components.Server.Theming,替换为Abp.AspNetCore.Blazor.Theme.Bootstrap.Server
  2. 打开DemoAppBlazorServerModule

    2.1 把DependsOn中依赖的模块名AbpAspNetCoreComponentsServerThemingModule改为AbpAspNetCoreBlazorThemeBootstrapServerModule

    2.2 引用Abp.AspNetCore.Blazor.Theme.Bootstrap命名空间

DemoApp.Blazor.WebAssembly

这个是模块的wasm模式下引用的类库,由上。

  1. 移除依赖Volo.Abp.AspNetCore.Components.WebAssembly.Theming,替换为Abp.AspNetCore.Blazor.Theme.Bootstrap.WebAssembly
  2. 打开DemoAppBlazorWebAssemblyModule

    2.1 把DependsOn中依赖的模块名AbpAspNetCoreComponentsWebAssemblyThemingModule改为AbpAspNetCoreBlazorThemeBootstrapWebAssemblyModule

    2.2 引用Abp.AspNetCore.Blazor.Theme.Bootstrap命名空间

替换Host主题

Blazor.Host

首先我们替换WebAssembly Host的主题,它比Server集成更简单一点

移除依赖

由于自带的用户管理、权限管理、租户管理等UI模块都是依赖了Blazorise的,所以需要从项目依赖中移除这几项:

  • Volo.Abp.Identity.Blazor.WebAssembly
  • Volo.Abp.TenantManagement.Blazor.WebAssembly
  • Volo.Abp.SettingManagement.Blazor.WebAssembly
  • Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme(主题)
  • Blazorise.Bootstrap
  • Blazorise.Icons.FontAwesome

修改DemoAppBlazorHostModule

  1. using System;
  2. using System.Net.Http;
  3. using Abp.AspNetCore.Blazor.Theme;
  4. using Abp.AspNetCore.Blazor.Theme.Bootstrap;
  5. using DemoApp.Blazor.WebAssembly;
  6. using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
  7. using Microsoft.Extensions.Configuration;
  8. using Microsoft.Extensions.DependencyInjection;
  9. using Volo.Abp.Account;
  10. using Volo.Abp.Autofac.WebAssembly;
  11. using Volo.Abp.AutoMapper;
  12. using Volo.Abp.Modularity;
  13. using Volo.Abp.UI.Navigation;
  14. namespace DemoApp.Blazor.Host
  15. {
  16. [DependsOn(
  17. typeof(AbpAutofacWebAssemblyModule),
  18. typeof(AbpAccountApplicationContractsModule),
  19. typeof(DemoAppBlazorWebAssemblyModule)
  20. )]
  21. public class DemoAppBlazorHostModule : AbpModule
  22. {
  23. public override void ConfigureServices(ServiceConfigurationContext context)
  24. {
  25. var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>();
  26. var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>();
  27. ConfigureAuthentication(builder);
  28. ConfigureHttpClient(context, environment);
  29. ConfigureRouter(context);
  30. ConfigureUI(builder);
  31. ConfigureMenu(context);
  32. ConfigureAutoMapper(context);
  33. }
  34. private void ConfigureRouter(ServiceConfigurationContext context)
  35. {
  36. Configure<AbpRouterOptions>(options =>
  37. {
  38. //options.AppAssembly = typeof(DemoAppBlazorHostModule).Assembly;这里要注释掉
  39. options.AdditionalAssemblies.Add(this.GetType().Assembly);
  40. });
  41. }
  42. private void ConfigureMenu(ServiceConfigurationContext context)
  43. {
  44. Configure<AbpNavigationOptions>(options =>
  45. {
  46. options.MenuContributors.Add(new DemoAppHostMenuContributor(context.Services.GetConfiguration()));
  47. });
  48. }
  49. private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
  50. {
  51. builder.Services.AddOidcAuthentication(options =>
  52. {
  53. builder.Configuration.Bind("AuthServer", options.ProviderOptions);
  54. options.ProviderOptions.DefaultScopes.Add("DemoApp");
  55. });
  56. }
  57. private static void ConfigureUI(WebAssemblyHostBuilder builder)
  58. {
  59. builder.RootComponents.Add<App>("#ApplicationContainer");
  60. }
  61. private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
  62. {
  63. context.Services.AddTransient(sp => new HttpClient
  64. {
  65. BaseAddress = new Uri(environment.BaseAddress)
  66. });
  67. }
  68. private void ConfigureAutoMapper(ServiceConfigurationContext context)
  69. {
  70. Configure<AbpAutoMapperOptions>(options =>
  71. {
  72. options.AddMaps<DemoAppBlazorHostModule>();
  73. });
  74. }
  75. }
  76. }

修改_Imports.razor

删除

  1. @using Blazorise
  2. @using Blazorise.DataGrid

添加

  1. @using BootstrapBlazor.Components
  2. @using Abp.AspNetCore.Blazor.Theme

重新生成样式

因为修改了主题需要重新bundle

先生成DemoApp.Blazor.Host项目,然后在控制台中转到DemoApp.Blazor.Host所在目录

执行:

  1. abp bundle

如果显示abp不是命令则需要安装abp-cli

登录后显示 :

Blazor.Server.Host

1.移除与替换依赖

移除以下包

  • Blazorise.Bootstrap
  • Blazorise.Icons.FontAwesome
  • Microsoft.EntityFrameworkCore.Tools
  • Volo.Abp.EntityFrameworkCore.SqlServer
  • Volo.Abp.AspNetCore.Authentication.JwtBearer
  • Volo.Abp.AspNetCore.Components.Server.BasicTheme
  • Volo.Abp.AuditLogging.EntityFrameworkCore
  • Volo.Abp.Account.Web.IdentityServer
  • Volo.Abp.Account.Application
  • Volo.Abp.FeatureManagement.EntityFrameworkCore
  • Volo.Abp.FeatureManagement.Application
  • Volo.Abp.Identity.Blazor.Server
  • Volo.Abp.Identity.EntityFrameworkCore
  • Volo.Abp.Identity.Application
  • Volo.Abp.TenantManagement.Blazor.Server
  • Volo.Abp.TenantManagement.EntityFrameworkCore
  • Volo.Abp.TenantManagement.Application
  • Volo.Abp.SettingManagement.Blazor.Server
  • Volo.Abp.SettingManagement.EntityFrameworkCore
  • Volo.Abp.SettingManagement.Application
  • Volo.Abp.PermissionManagement.Application
  • Volo.Abp.PermissionManagement.EntityFrameworkCore
  • DemoApp.EntityFrameworkCore\DemoApp.EntityFrameworkCore
  • DemoApp.HttpApi

添加以下包

  • Volo.Abp.AspNetCore.Authentication.OpenIdConnect
  • Volo.Abp.AspNetCore.Mvc.Client
  • Volo.Abp.AspNetCore.Authentication.OAuth
  • Volo.Abp.Http.Client.IdentityModel.Web
  • Volo.Abp.PermissionManagement.HttpApi.Client
  • Volo.Abp.Identity.HttpApi.Client
  • Volo.Abp.TenantManagement.HttpApi.Client
  • Volo.Abp.FeatureManagement.HttpApi.Client
  • DemoApp.HttpApi.Client

2.修改Module.cs

1.删除DependsOn中已移除的模块

还要删除

  • DemoAppEntityFrameworkCoreModule(因为不需要直接读取数据库了)

  • DemoAppApplicationModule

  • DemoAppHttpApiModule

    添加以下模块

  • AbpAspNetCoreMvcClientModule

  • AbpAspNetCoreAuthenticationOAuthModule

  • AbpAspNetCoreAuthenticationOpenIdConnectModule

  • AbpHttpClientIdentityModelWebModule

  • AbpAspNetCoreMvcUiBasicThemeModule

  • AbpAspNetCoreSerilogModule

  • AbpIdentityHttpApiClientModule

  • AbpFeatureManagementHttpApiClientModule

  • AbpTenantManagementHttpApiClientModule

  • AbpPermissionManagementHttpApiClientModule

2.ConfigureServices
  1. public override void ConfigureServices(ServiceConfigurationContext context)
  2. {
  3. var hostingEnvironment = context.Services.GetHostingEnvironment();
  4. var configuration = context.Services.GetConfiguration();
  5. Configure<AbpBundlingOptions>(options =>
  6. {
  7. // MVC UI
  8. options.StyleBundles.Configure(
  9. BasicThemeBundles.Styles.Global,
  10. bundle =>
  11. {
  12. bundle.AddFiles("/global-styles.css");
  13. }
  14. );
  15. //BLAZOR UI
  16. options.StyleBundles.Configure(
  17. BlazorBootstrapThemeBundles.Styles.Global,
  18. bundle =>
  19. {
  20. bundle.AddFiles("/blazor-global-styles.css");
  21. //You can remove the following line if you don't use Blazor CSS isolation for components
  22. bundle.AddFiles("/DemoApp.Blazor.Server.Host.styles.css");
  23. }
  24. );
  25. });
  26. context.Services.AddAuthentication(options =>
  27. {
  28. options.DefaultScheme = "Cookies";
  29. options.DefaultChallengeScheme = "oidc";
  30. })
  31. .AddCookie("Cookies", options => { options.ExpireTimeSpan = TimeSpan.FromDays(365); })
  32. .AddAbpOpenIdConnect("oidc", options =>
  33. {
  34. options.Authority = configuration["AuthServer:Authority"];
  35. options.ClientId = configuration["AuthServer:ClientId"];
  36. options.ClientSecret = configuration["AuthServer:ClientSecret"];
  37. options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
  38. options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
  39. options.SaveTokens = true;
  40. options.GetClaimsFromUserInfoEndpoint = true;
  41. options.Scope.Add("role");
  42. options.Scope.Add("email");
  43. options.Scope.Add("phone");
  44. options.Scope.Add("DemoApp");
  45. });
  46. if(hostingEnvironment.IsDevelopment())
  47. {
  48. Configure<AbpVirtualFileSystemOptions>(options =>
  49. {
  50. options.FileSets.ReplaceEmbeddedByPhysical<DemoAppDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}DemoApp.Domain.Shared", Path.DirectorySeparatorChar)));
  51. options.FileSets.ReplaceEmbeddedByPhysical<DemoAppDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}DemoApp.Domain", Path.DirectorySeparatorChar)));
  52. options.FileSets.ReplaceEmbeddedByPhysical<DemoAppApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}DemoApp.Application.Contracts", Path.DirectorySeparatorChar)));
  53. options.FileSets.ReplaceEmbeddedByPhysical<DemoAppApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}DemoApp.Application", Path.DirectorySeparatorChar)));
  54. options.FileSets.ReplaceEmbeddedByPhysical<DemoAppBlazorHostModule>(hostingEnvironment.ContentRootPath);
  55. });
  56. }
  57. context.Services.AddAbpSwaggerGen(
  58. options =>
  59. {
  60. options.SwaggerDoc("v1", new OpenApiInfo { Title = "DemoApp API", Version = "v1" });
  61. options.DocInclusionPredicate((docName, description) => true);
  62. options.CustomSchemaIds(type => type.FullName);
  63. });
  64. Configure<AbpLocalizationOptions>(options =>
  65. {
  66. options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
  67. options.Languages.Add(new LanguageInfo("en", "en", "English"));
  68. options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
  69. options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
  70. options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
  71. options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in"));
  72. options.Languages.Add(new LanguageInfo("it", "it", "Italian", "it"));
  73. options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
  74. options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português (Brasil)"));
  75. options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
  76. options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
  77. options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
  78. options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
  79. options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
  80. });
  81. Configure<AbpMultiTenancyOptions>(options =>
  82. {
  83. options.IsEnabled = MultiTenancyConsts.IsEnabled;
  84. });
  85. context.Services.AddTransient(sp => new HttpClient
  86. {
  87. BaseAddress = new Uri("/")
  88. });
  89. Configure<AbpNavigationOptions>(options =>
  90. {
  91. options.MenuContributors.Add(new DemoAppMenuContributor());
  92. });
  93. // Configure<AbpRouterOptions>(options => { options.AppAssembly = typeof(DemoAppBlazorHostModule).Assembly; });
  94. Configure<AbpRouterOptions>(options => { options.AdditionalAssemblies .Add(typeof(DemoAppBlazorHostModule).Assembly); });//要改成这个
  95. }
3.OnApplicationInitialization
  1. public override void OnApplicationInitialization(ApplicationInitializationContext context)
  2. {
  3. var env = context.GetEnvironment();
  4. var app = context.GetApplicationBuilder();
  5. app.UseAbpRequestLocalization();
  6. if (env.IsDevelopment())
  7. {
  8. app.UseDeveloperExceptionPage();
  9. }
  10. else
  11. {
  12. app.UseExceptionHandler("/Error");
  13. app.UseHsts();
  14. }
  15. app.UseHttpsRedirection();
  16. app.UseCorrelationId();
  17. app.UseStaticFiles();
  18. app.UseRouting();
  19. app.UseAuthentication();
  20. //app.UseJwtTokenMiddleware();
  21. if (MultiTenancyConsts.IsEnabled)
  22. {
  23. app.UseMultiTenancy();
  24. }
  25. // app.UseUnitOfWork();
  26. //app.UseIdentityServer();
  27. app.UseAuthorization();
  28. app.UseSwagger();
  29. app.UseAbpSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "DemoApp API"); });
  30. app.UseConfiguredEndpoints();
  31. using (var scope = context.ServiceProvider.CreateScope())
  32. {
  33. AsyncHelper.RunSync(async () =>
  34. {
  35. await scope.ServiceProvider
  36. .GetRequiredService<IDataSeeder>()
  37. .SeedAsync();
  38. });
  39. }
  40. }

3.修改_Imports.razor

删除

  1. @using Blazorise
  2. @using Blazorise.DataGrid
  3. @using Volo.Abp.BlazoriseUI
  4. @using Volo.Abp.BlazoriseUI.Components

添加

  1. @using BootstrapBlazor.Components
  2. @using Abp.AspNetCore.Blazor.Theme

4.删除EntityFrameworkCore和Migrations目录

因为我们直接调用httpApi获取数据所以不需要host去读取数据库,所以把这两个目录删除

5._Host.cshtml

  1. @page "/"
  2. @namespace DemoApp.Blazor.Server.Host.Pages
  3. @using System.Globalization
  4. @using Abp.AspNetCore.Blazor.Theme.Bootstrap
  5. @using Abp.AspNetCore.Blazor.Theme.Server
  6. @using Volo.Abp.Localization
  7. @{
  8. Layout = null;
  9. var rtl = CultureHelper.IsRtl ? "rtl" : string.Empty;
  10. }
  11. <!DOCTYPE html>
  12. <html lang="@CultureInfo.CurrentCulture.Name" dir="@rtl">
  13. <head>
  14. <meta charset="utf-8" />
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  16. <title>DemoApp.Blazor.Server</title>
  17. <base href="~/" />
  18. <abp-style-bundle name="@BlazorBootstrapThemeBundles.Styles.Global" />
  19. </head>
  20. <body class="abp-application-layout bg-light @rtl">
  21. <component type="typeof(App)" render-mode="Server" />
  22. <div id="blazor-error-ui">
  23. <environment include="Staging,Production">
  24. An error has occurred. This application may no longer respond until reloaded.
  25. </environment>
  26. <environment include="Development">
  27. An unhandled exception has occurred. See browser dev tools for details.
  28. </environment>
  29. <a href="" class="reload">Reload</a>
  30. <a class="dismiss"></a>
  31. </div>
  32. <abp-script-bundle name="@BlazorBootstrapThemeBundles.Scripts.Global" />
  33. </body>
  34. </html>

6.DemoAppMenuContributor

注释ConfigureMainMenuAsync方法体,因为我们没有那几个模块了

7.修改appsettings.json配置

删除ConnectionStrings节点

修改AuthServer为:

  1. "AuthServer": {
  2. "Authority": "https://localhost:44364",
  3. "RequireHttpsMetadata": "true",
  4. "ClientId": "DemoApp_Blazor_Server",
  5. "ClientSecret": "1q2w3e*"
  6. }

其中Authority配置项为IdentityServer的uri,ClientId需要记住,等会还要用到

添加:

  1. "RemoteServices": {
  2. "Default": {
  3. "BaseUrl": "https://localhost:44396/"
  4. }
  5. }

这里配置的是httpapi的uri

5.添加登录控制器

创建Controllers目录,添加AccountController

  1. public class AccountController : ChallengeAccountController
  2. {
  3. }

6.添加identityServer配置

打开DemoApp.IdentityServer项目

1.修改appsettings.json

在IdentityServer的Clients中添加

  1. "DemoApp_Blazor_Server": {
  2. "ClientId": "DemoApp_Blazor_Server",
  3. "RootUrl": "https://localhost:44313/"
  4. "ClientSecret": "1q2w3e*",
  5. }

定位到IdentityServer/IdentityServerDataSeedContributor.cs,添加IdentityServer配置。

修改CreateClientsAsync方法,添加

  1. var blazorServerTieredClientId = configurationSection["DemoApp_Blazor_Server:ClientId"];
  2. if (!blazorServerTieredClientId.IsNullOrWhiteSpace())
  3. {
  4. var blazorServerTieredClientRootUrl = configurationSection["DemoApp_Blazor_Server:RootUrl"].EnsureEndsWith('/');
  5. /* Admin_BlazorServerTiered client is only needed if you created a tiered blazor server
  6. * solution. Otherwise, you can delete this client. */
  7. await CreateClientAsync(
  8. name: blazorServerTieredClientId,
  9. scopes: commonScopes,
  10. grantTypes: new[] { "hybrid" },
  11. secret: (configurationSection["DemoApp_Blazor_Server:ClientSecret"] ?? "1q2w3e*").Sha256(),
  12. redirectUri: $"{blazorServerTieredClientRootUrl}signin-oidc",
  13. postLogoutRedirectUri: $"{blazorServerTieredClientRootUrl}signout-callback-oidc",
  14. frontChannelLogoutUri: $"{blazorServerTieredClientRootUrl}Account/FrontChannelLogout",
  15. corsOrigins: new[] { blazorServerTieredClientRootUrl.RemovePostFix("/") }
  16. );
  17. }

修改完成后需要重新打开IdentityServer配置即可生效。

7.修改菜单

定位到Menus>DemoAppMenuContributor.cs

  1. using System.Threading.Tasks;
  2. using DemoApp.MultiTenancy;
  3. using Volo.Abp.UI.Navigation;
  4. namespace DemoApp.Blazor.Server.Host.Menus
  5. {
  6. public class DemoAppMenuContributor : IMenuContributor
  7. {
  8. public async Task ConfigureMenuAsync(MenuConfigurationContext context)
  9. {
  10. if (context.Menu.Name == StandardMenus.Main)
  11. {
  12. await ConfigureMainMenuAsync(context);
  13. }
  14. }
  15. private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
  16. {
  17. var administration = context.Menu.GetAdministration();
  18. context.Menu.Items.Insert(0,
  19. new ApplicationMenuItem("Index", displayName: "Index", "/", icon: "fa fa-home"));
  20. // if (MultiTenancyConsts.IsEnabled)
  21. // {
  22. // administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1);
  23. // }
  24. // else
  25. // {
  26. // administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
  27. // }
  28. //
  29. // administration.SetSubItemOrder(IdentityMenuNames.GroupName, 2);
  30. // administration.SetSubItemOrder(SettingManagementMenus.GroupName, 3);
  31. return Task.CompletedTask;
  32. }
  33. }
  34. }

未完成的

由于移除了abp中的几个页面模块,所以需要重写用户管理、角色管理、租户管理等页面,这些模块我完善之后会放出来。还有identityServer的登录页面也应该重写。

Abp Vnext Blazor替换UI组件 集成BootstrapBlazor(详细过程)的更多相关文章

  1. 【转】C# ABP WebApi与Swagger UI的集成

    以前在做WebAPI调用测试时,一直在使用Fiddler测试工具了,而且这个用起来比较繁琐,需要各种配置,并且不直观,还有一点是还得弄明白URL地址和要传递的参数,然后才能调用.  最近新入职,公司里 ...

  2. C# ABP WebApi与Swagger UI的集成

    本文是配置WebApi与Swagger UI,可以参照 http://www.cnblogs.com/farb/p/ABPSwaggerUIIntegration.html 1. 安装swagger ...

  3. Blazor组件提交全记录: FullScreen 全屏按钮/全屏服务 (BootstrapBlazor - Bootstrap 风格的 Blazor UI 组件库)

    Blazor 简介 Blazor 是一个使用 .NET 生成的交互式客户端 Web UI 的框架.和前端同学所熟知的 Vue.React.Angular 有巨大差异. 其最大的特色是使用 C# 代码( ...

  4. 基于 abp vNext 和 .NET Core 开发博客项目 - Blazor 实战系列(一)

    系列文章 基于 abp vNext 和 .NET Core 开发博客项目 - 使用 abp cli 搭建项目 基于 abp vNext 和 .NET Core 开发博客项目 - 给项目瘦身,让它跑起来 ...

  5. [Abp vNext 源码分析] - 14. EntityFramework Core 的集成

    一.简要介绍 在以前的文章里面,我们介绍了 ABP vNext 在 DDD 模块定义了仓储的接口定义和基本实现.本章将会介绍,ABP vNext 是如何将 EntityFramework Core 框 ...

  6. 基于 abp vNext 和 .NET Core 开发博客项目 - Blazor 实战系列(二)

    系列文章 基于 abp vNext 和 .NET Core 开发博客项目 - 使用 abp cli 搭建项目 基于 abp vNext 和 .NET Core 开发博客项目 - 给项目瘦身,让它跑起来 ...

  7. 基于 abp vNext 和 .NET Core 开发博客项目 - Blazor 实战系列(三)

    系列文章 基于 abp vNext 和 .NET Core 开发博客项目 - 使用 abp cli 搭建项目 基于 abp vNext 和 .NET Core 开发博客项目 - 给项目瘦身,让它跑起来 ...

  8. 基于 abp vNext 和 .NET Core 开发博客项目 - Blazor 实战系列(四)

    系列文章 基于 abp vNext 和 .NET Core 开发博客项目 - 使用 abp cli 搭建项目 基于 abp vNext 和 .NET Core 开发博客项目 - 给项目瘦身,让它跑起来 ...

  9. 基于 abp vNext 和 .NET Core 开发博客项目 - Blazor 实战系列(五)

    系列文章 基于 abp vNext 和 .NET Core 开发博客项目 - 使用 abp cli 搭建项目 基于 abp vNext 和 .NET Core 开发博客项目 - 给项目瘦身,让它跑起来 ...

随机推荐

  1. Flask的环境配置

      Flask django是大而全,提供所有常用的功能 flask是小而精,只提供核心功能 环境配置 为了防止 django和 flask环境相互冲突,可以使用 虚拟环境分割开 pip instal ...

  2. Convolutional Neural Network-week1编程题(TensorFlow实现手势数字识别)

    1. TensorFlow model import math import numpy as np import h5py import matplotlib.pyplot as plt impor ...

  3. JAVA的array中indexOf

    记得龙哥有个重构的文章里说直接判断啥的. 今天看JDK ArrayList,看到了他的 indexOf,他先判断,后进入循环,看似写了两遍for 循环,但是简单明了暴力.i like it . pub ...

  4. Spring Cloud Gateway 网关限流

    Spring Cloud Gateway 限流 一.背景 二.实现功能 三.网关层限流 1.使用默认的redis来限流 1.引入jar包 2.编写配置文件 3.网关正常响应 4.网关限流响应 2.自定 ...

  5. 用建造者模式实现一个防SQL注入的ORM框架

    本文节选自<设计模式就该这样学> 1 建造者模式的链式写法 以构建一门课程为例,一个完整的课程由PPT课件.回放视频.课堂笔记.课后作业组成,但是这些内容的设置顺序可以随意调整,我们用建造 ...

  6. 转:VIVADO使用技巧:设置DCI与内部参考电压

    本文转自:Vivado使用技巧(12):设置DCI与内部参考电压 - 灰信网(软件开发博客聚合) (freesion.com) DCI与内部参考电压 Xilinx FPGA提供了DCI(Digital ...

  7. Python 类似 SyntaxError: Non-ASCII character '\xc3' in file

    Python 类似 SyntaxError: Non-ASCII character '\xc3' in file 产生这个问题的原因: python 的默认编码文件是ACSII,而编辑器将文件保存为 ...

  8. cf12D Ball(MAP,排序,贪心思想)

    题意: N位女士一起聚在一个舞厅.每位女士有三个特征值B,I,R.分别代表美貌,智慧,富有. 对于一位女士而言,如果存在一个女士的B,I,R都分别大于她自己的B,I,R.则她自己会自杀. 统计总共有多 ...

  9. Spring事务的介绍,以及基于注解@Transactional的声明式事务

    前言 事务是一个非常重要的知识点,前面的文章已经有介绍了关于SpringAOP代理的实现过程:事务管理也是AOP的一个重要的功能. 事务的基本介绍 数据库事务特性: 原子性 一致性 隔离性 持久性 事 ...

  10. sql sever 约束

    SQLServer中有五种约束,Primary Key约束.Foreign Key约束.Unique约束.Default约束和Check约束 1.Primary Key约束在表中常有一列或多列的组合, ...