Customize the footer render and right content
This commit is contained in:
Родитель
40a3feb64e
Коммит
7898da3f74
|
@ -43,6 +43,7 @@
|
|||
<SpaceItem>
|
||||
<AvatarDropdown Name="@_currentUser.Name"
|
||||
Avatar="@_currentUser.Avatar"
|
||||
MenuItems="@AvatarMenuItems"
|
||||
OnItemSelected="HandleSelectUser" />
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
using AntDesign.Pro.Template.Models;
|
||||
using AntDesign.Pro.Template.Services;
|
||||
using AntDesign.ProLayout;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using AntDesign.ProLayout;
|
||||
using AntDesign.Pro.Template.Models;
|
||||
using AntDesign.Pro.Template.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using AntDesign;
|
||||
|
||||
namespace AntDesign.Pro.Template.Components
|
||||
{
|
||||
|
@ -36,6 +35,14 @@ namespace AntDesign.Pro.Template.Components
|
|||
}
|
||||
};
|
||||
|
||||
public AvatarMenuItem[] AvatarMenuItems { get; set; } = new AvatarMenuItem[]
|
||||
{
|
||||
new() { Key = "center", IconType = "user", Option = "个人中心"},
|
||||
new() { Key = "setting", IconType = "setting", Option = "个人设置"},
|
||||
new() { IsDivider = true },
|
||||
new() { Key = "logout", IconType = "logout", Option = "退出登录"}
|
||||
};
|
||||
|
||||
[Inject] protected NavigationManager NavigationManager { get; set; }
|
||||
|
||||
[Inject] protected IUserService UserService { get; set; }
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
<ChildContent>
|
||||
@Body
|
||||
</ChildContent>
|
||||
<FooterRender>
|
||||
<FooterView Copyright="2021 Ant Design Blazor" Links="Links"></FooterView>
|
||||
</FooterRender>
|
||||
</AntDesign.ProLayout.BasicLayout>
|
||||
<SettingDrawer />
|
||||
|
||||
|
@ -23,4 +26,29 @@
|
|||
await base.OnInitializedAsync();
|
||||
MenuData = await HttpClient.GetFromJsonAsync<MenuDataItem[]>("data/menu.json");
|
||||
}
|
||||
|
||||
public LinkItem[] Links { get; set; } =
|
||||
{
|
||||
new LinkItem
|
||||
{
|
||||
Key = "Ant Design Blazor",
|
||||
Title = "Ant Design Blazor",
|
||||
Href = "https://antblazor.com",
|
||||
BlankTarget = true,
|
||||
},
|
||||
new LinkItem
|
||||
{
|
||||
Key = "github",
|
||||
Title = (RenderFragment)(@<Icon Type="github" />),
|
||||
Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor",
|
||||
BlankTarget = true,
|
||||
},
|
||||
new LinkItem
|
||||
{
|
||||
Key = "Blazor",
|
||||
Title = "Blazor",
|
||||
Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987",
|
||||
BlankTarget = true,
|
||||
}
|
||||
};
|
||||
}
|
|
@ -14,23 +14,37 @@
|
|||
<span class="title">Ant Design</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="desc">Ant Design 是西湖区最具影响力的 Web 设计规范</div>
|
||||
<div class="desc">Ant Design Blazor</div>
|
||||
</div>
|
||||
@Body
|
||||
</div>
|
||||
<GlobalFooter Links="_links">
|
||||
<Copyright>
|
||||
Copyright <Icon Type="copyright" /> 2019 蚂蚁金服体验技术部出品
|
||||
</Copyright>
|
||||
</GlobalFooter>
|
||||
<FooterView Copyright="2021 Ant Design Blazor" Links="Links"></FooterView>
|
||||
</div>
|
||||
|
||||
@code
|
||||
{
|
||||
private readonly LinkItem[] _links =
|
||||
public LinkItem[] Links { get; set; } =
|
||||
{
|
||||
new LinkItem{ Key = "", BlankTarget = true, Title = "Ant Design Pro"},
|
||||
new LinkItem{ Key = "", BlankTarget = true, Title = OneOf<string, RenderFragment>.FromT1(@<Icon Type="github" />)},
|
||||
new LinkItem{ Key = "", BlankTarget = true, Title = "Ant Design"},
|
||||
new LinkItem
|
||||
{
|
||||
Key = "Ant Design Blazor",
|
||||
Title = "Ant Design Blazor",
|
||||
Href = "https://antblazor.com",
|
||||
BlankTarget = true,
|
||||
},
|
||||
new LinkItem
|
||||
{
|
||||
Key = "github",
|
||||
Title = (RenderFragment)(@<Icon Type="github" />),
|
||||
Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor",
|
||||
BlankTarget = true,
|
||||
},
|
||||
new LinkItem
|
||||
{
|
||||
Key = "Blazor",
|
||||
Title = "Blazor",
|
||||
Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987",
|
||||
BlankTarget = true,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче