refactor: 格式化文档
This commit is contained in:
parent
e150e33bfe
commit
b417eb04c8
|
@ -1,37 +1,36 @@
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
|
||||||
namespace BootstrapAdmin.Web.Pages.Home
|
namespace BootstrapAdmin.Web.Pages.Home;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
[Route("/")]
|
||||||
|
[Route("/Home")]
|
||||||
|
[Route("/Home/Index")]
|
||||||
|
[Authorize]
|
||||||
|
public class Index : ComponentBase
|
||||||
{
|
{
|
||||||
|
[Inject]
|
||||||
|
[NotNull]
|
||||||
|
private NavigationManager? Navigation { get; set; }
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("/")]
|
/// <param name="firstRender"></param>
|
||||||
[Route("/Home")]
|
protected override void OnAfterRender(bool firstRender)
|
||||||
[Route("/Home/Index")]
|
|
||||||
[Authorize]
|
|
||||||
public class Index : ComponentBase
|
|
||||||
{
|
{
|
||||||
[Inject]
|
Navigation.NavigateTo($"/Admin/Index", true);
|
||||||
[NotNull]
|
|
||||||
private NavigationManager? Navigation { get; set; }
|
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="firstRender"></param>
|
|
||||||
protected override void OnAfterRender(bool firstRender)
|
|
||||||
{
|
|
||||||
Navigation.NavigateTo($"/Admin/Index", true);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
protected override void OnInitialized()
|
|
||||||
{
|
|
||||||
Navigation.NavigateTo($"/Admin/Index", true);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
Navigation.NavigateTo($"/Admin/Index");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue