refactor: 增加页面路由以及 Tab 自动调整

This commit is contained in:
Argo Window10 2019-12-10 22:11:22 +08:00
parent 8fae244170
commit e554f58fa2
3 changed files with 18 additions and 6 deletions

View File

@ -6,3 +6,16 @@
@page "/Pages/Admin/Roles"
@page "/Pages/Admin/Users"
@page "/Pages/Admin/Settings"
@page "/Pages/Home/Index"
@page "/Pages/Admin/Messages"
@page "/Pages/Admin/Tasks"
@page "/Pages/Admin/Notifications"
@page "/Pages/Admin/Logs"
@page "/Pages/Admin/Logins"
@page "/Pages/Admin/Traces"
@page "/Pages/Admin/SQL"
@page "/Pages/Admin/Online"
@page "/Pages/Admin/Analyse"
@page "/Pages/Admin/Exceptions"
@page "/Pages/Admin/Healths"
@page "/Pages/Admin/Mobile"

View File

@ -4,7 +4,7 @@
<img src="@model?.Image.ToBlazorLink()" />
<h1>@model?.Content</h1>
<h3>@model?.Detail</h3>
<p><a href="/Account/Logout">登录</a> <span>或者</span> <a href="@model?.ReturnUrl.ToBlazorMenuUrl()">返回首页</a> <span>或者</span> <a href="/healths-ui">系统自检</a></p>
<p><a href="/Account/Logout">登录</a> <span>或者</span> <a href="@model?.ReturnUrl.ToBlazorLink()">返回首页</a> <span>或者</span> <a href="/healths-ui">系统自检</a></p>
@if (@model?.Id == 403)
{
<div>

View File

@ -58,11 +58,10 @@
// 通过指定 ID 设置站点 Title
var menuId = 'menus_' + id;
var $curMenu = $('.sidebar .active').first();
if ($curMenu.attr('id') !== menuId) {
// set website title
$('head title').text($menu.text());
this.resetTab(id);
}
// set website title
$('head title').text($curMenu.text());
this.resetTab(id);
},
removeTab: function (tabId) {
// 通过当前 Tab 返回如果移除后新的 TabId