Browse Source

Add hook to layout

pull/41/head 0.9.8
liangshiwei 7 months ago
parent
commit
d1c9a598ed
  1. 0
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHooks/LayoutHook.razor
  2. 2
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHooks/LayoutHook.razor.cs
  3. 9
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/StandardLayouts.cs
  4. 10
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor

0
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHook.razor → modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHooks/LayoutHook.razor

2
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHook.razor.cs → modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHooks/LayoutHook.razor.cs

@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Options;
using Volo.Abp.Ui.LayoutHooks;
namespace Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Components;
namespace Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Components.LayoutHooks;
public partial class LayoutHook : ComponentBase
{

9
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/StandardLayouts.cs

@ -0,0 +1,9 @@
namespace Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout;
public static class StandardLayouts
{
public const string Application = "Application";
public const string Account = "Account";
public const string Public = "Public";
public const string Empty = "Empty";
}

10
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor

@ -2,6 +2,9 @@
@using Microsoft.Extensions.Options
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Settings
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Components
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout
@using Volo.Abp.Ui.LayoutHooks
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Components.LayoutHooks
@inject IOptions<AbpAntDesignThemeOptions> Options
@ -18,7 +21,9 @@
<Content Class="ant-design-content">
<PageAlert/>
<div class="ant-design-body-content">
<LayoutHook Name="@LayoutHooks.Body.First" Layout="@StandardLayouts.Application" />
@Body
<LayoutHook Name="@LayoutHooks.Body.Last" Layout="@StandardLayouts.Application" />
</div>
<DynamicLayoutComponent />
<UiPageProgress/>
@ -60,13 +65,16 @@ else
<Content Class="ant-design-content">
<PageAlert/>
<div class="ant-design-body-content">
@if (!Options.Value.EnableMultipleTabs){
<LayoutHook Name="@LayoutHooks.Body.First" Layout="@StandardLayouts.Application" />
@if (!Options.Value.EnableMultipleTabs)
{
@Body
}
else
{
<ReuseTabs Class="ant-design-body-reusetabs" TabPaneClass="ant-design-body-reusetabs-tabpane" Draggable></ReuseTabs>
}
<LayoutHook Name="@LayoutHooks.Body.Last" Layout="@StandardLayouts.Application" />
</div>
<DynamicLayoutComponent />
<UiPageProgress/>

Loading…
Cancel
Save