Browse Source

✨ 添加Blaozr实现

blazor2
王军 5 years ago
parent
commit
5b488291ba
  1. 6
      aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/AbpProWebBlazorServerModule.cs
  2. 1
      aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/App.razor
  3. 2
      aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/Pages/Index.razor
  4. 2
      aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/Pages/_Host.cshtml
  5. 2
      aspnet-core/services/host/Lion.AbpPro.Web.Blazor.WebAssembly/App.razor
  6. 2
      aspnet-core/services/host/Lion.AbpPro.Web.Blazor.WebAssembly/wwwroot/index.html
  7. 7
      aspnet-core/services/src/Lion.AbpPro.Blazor.Layout.AntDesignTheme/AbpProBlazorLayoutAntDesignThemeModule.cs
  8. 1
      aspnet-core/services/src/Lion.AbpPro.Blazor.Layout.AntDesignTheme/Lion.AbpPro.Blazor.Layout.AntDesignTheme.csproj
  9. 2
      aspnet-core/services/src/Lion.AbpPro.Blazor.Layout.AntDesignTheme/Pages/Test.razor
  10. 1
      aspnet-core/services/src/Lion.AbpPro.Blazor.Layout.AntDesignTheme/_Imports.razor

6
aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/AbpProWebBlazorServerModule.cs

@ -1,4 +1,5 @@
using Lion.AbpPro.Web.Blazor.Server.Data; using Lion.AbpPro.Blazor.Layout.AntDesignTheme;
using Lion.AbpPro.Web.Blazor.Server.Data;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
@ -10,7 +11,8 @@ using Volo.Abp.Modularity;
namespace Lion.AbpPro.Web.Blazor.Server namespace Lion.AbpPro.Web.Blazor.Server
{ {
[DependsOn(typeof(AbpAutofacModule), [DependsOn(typeof(AbpAutofacModule),
typeof(AbpAspNetCoreSerilogModule))] typeof(AbpAspNetCoreSerilogModule),
typeof(AbpProBlazorLayoutAntDesignThemeModule))]
public class AbpProWebBlazorServerModule:AbpModule public class AbpProWebBlazorServerModule:AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)

1
aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/App.razor

@ -8,3 +8,4 @@
</LayoutView> </LayoutView>
</NotFound> </NotFound>
</Router> </Router>
<AntContainer />

2
aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/Pages/Index.razor

@ -3,5 +3,5 @@
<h1>Hello, world!</h1> <h1>Hello, world!</h1>
Welcome to your new app. Welcome to your new app.
<Button Type="primary">Hello World!</Button>
<SurveyPrompt Title="How is Blazor working for you?" /> <SurveyPrompt Title="How is Blazor working for you?" />

2
aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/Pages/_Host.cshtml

@ -15,6 +15,8 @@
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" /> <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="css/site.css" rel="stylesheet" /> <link href="css/site.css" rel="stylesheet" />
<link href="Lion.AbpPro.Web.Blazor.Server.styles.css" rel="stylesheet" /> <link href="Lion.AbpPro.Web.Blazor.Server.styles.css" rel="stylesheet" />
<link href="_content/AntDesign/css/ant-design-blazor.css" rel="stylesheet">
<script src="_content/AntDesign/js/ant-design-blazor.js"></script>
</head> </head>
<body> <body>
<component type="typeof(App)" render-mode="ServerPrerendered" /> <component type="typeof(App)" render-mode="ServerPrerendered" />

2
aspnet-core/services/host/Lion.AbpPro.Web.Blazor.WebAssembly/App.razor

@ -10,3 +10,5 @@
</LayoutView> </LayoutView>
</NotFound> </NotFound>
</Router> </Router>
<AntContainer />

2
aspnet-core/services/host/Lion.AbpPro.Web.Blazor.WebAssembly/wwwroot/index.html

@ -9,6 +9,8 @@
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" /> <link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" /> <link href="css/app.css" rel="stylesheet" />
<link href="Lion.AbpPro.Web.Blazor.WebAssembly.styles.css" rel="stylesheet" /> <link href="Lion.AbpPro.Web.Blazor.WebAssembly.styles.css" rel="stylesheet" />
<link href="_content/AntDesign/css/ant-design-blazor.css" rel="stylesheet">
<script src="_content/AntDesign/js/ant-design-blazor.js"></script>
</head> </head>
<body> <body>

7
aspnet-core/services/src/Lion.AbpPro.Blazor.Layout.AntDesignTheme/AbpProBlazorLayoutAntDesignThemeModule.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
@ -13,11 +14,7 @@ namespace Lion.AbpPro.Blazor.Layout.AntDesignTheme
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
context.Services.AddAntDesign();
Configure<AbpRouterOptions>(options =>
{
options.AdditionalAssemblies.Add(typeof(AbpProBlazorLayoutAntDesignThemeModule).Assembly);
});
} }
} }
} }

1
aspnet-core/services/src/Lion.AbpPro.Blazor.Layout.AntDesignTheme/Lion.AbpPro.Blazor.Layout.AntDesignTheme.csproj

@ -10,6 +10,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AntDesign" Version="0.10.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="$(MicrosoftVersion)" /> <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="$(MicrosoftVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Components.Web.Theming" Version="$(AbpPackageVersion)" /> <PackageReference Include="Volo.Abp.AspNetCore.Components.Web.Theming" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Core" Version="$(AbpPackageVersion)" /> <PackageReference Include="Volo.Abp.Core" Version="$(AbpPackageVersion)" />

2
aspnet-core/services/src/Lion.AbpPro.Blazor.Layout.AntDesignTheme/Pages/Test.razor

@ -1,5 +1,5 @@
@page "/Test" @page "/Test"
<h3>Test</h3> <Button Type="primary">Hello World!</Button>
@code { @code {

1
aspnet-core/services/src/Lion.AbpPro.Blazor.Layout.AntDesignTheme/_Imports.razor

@ -1 +1,2 @@
@using Microsoft.AspNetCore.Components.Web @using Microsoft.AspNetCore.Components.Web
@using AntDesign
Loading…
Cancel
Save