!66 重构代码:Blazor 模式代码统一到 Pages 目录下

Merge pull request !66 from Argo/dev-blazor
This commit is contained in:
Argo 2020-01-29 10:03:33 +08:00 committed by Gitee
commit 69c24b83c9
110 changed files with 111 additions and 109 deletions

View File

@ -1,7 +1,7 @@
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Shared;
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// AdminLayout 布局类

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 弹窗组件基类

View File

@ -1,4 +1,4 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Pages.Extensions;
using Bootstrap.Security.Authorization;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Authorization;
@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Components.Rendering;
using System;
using System.Threading.Tasks;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 授权组件

View File

@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Components.Forms;
using System;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// BootstrapAdminDataAnnotationsValidator 验证组件

View File

@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,4 +1,4 @@
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// CheckBox 组件状态枚举值

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using System;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Checkbox 组件基类

View File

@ -1,4 +1,4 @@
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,11 +1,11 @@
using System;
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Extensions;
using Bootstrap.Admin.Pages.Shared;
using Bootstrap.Security.Authorization;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 条件输出组件

View File

@ -1,6 +1,6 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Pages.Extensions;
using Bootstrap.Admin.Models;
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Shared;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Server;
@ -9,7 +9,7 @@ using System;
using System.Net;
using System.Threading.Tasks;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Dropdown 组件

View File

@ -1,9 +1,9 @@
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Shared;
using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 可编辑页面组件包含查询与数据表格

View File

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System;
using System.Linq.Expressions;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,8 +1,8 @@
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Shared;
using Bootstrap.DataAccess;
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// IRules 接口

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components.Forms;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// ITableHeader 接口

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// IValidComponent 接口

View File

@ -5,7 +5,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// LgbEditForm 组件

View File

@ -2,7 +2,7 @@
using System;
using System.Linq;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// LgbInputText 组件

View File

@ -1,6 +1,6 @@
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Shared;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// LgbInputText 组件

View File

@ -1,10 +1,10 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Pages.Extensions;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using System;
using System.Linq.Expressions;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 表头组件

View File

@ -1,9 +1,9 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Pages.Extensions;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 模态框组件类

View File

@ -1,7 +1,7 @@
using Bootstrap.Security;
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Components.Rendering;
using Microsoft.AspNetCore.Http;
using System;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// PageContent 网页组件
@ -31,7 +31,7 @@ namespace Bootstrap.Admin.Components
var name = Name.Replace("/", ".");
if (!string.IsNullOrEmpty(name))
{
var t = Type.GetType($"Bootstrap.Admin{name}");
var t = Type.GetType($"Bootstrap.Admin.Pages.Views.{name}");
if (t != null)
{
// 访问日志

View File

@ -1,4 +1,4 @@
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// PageContentAttributes 实体类

View File

@ -2,7 +2,7 @@
using System;
using System.Collections.Generic;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 分页组件基类

View File

@ -1,4 +1,4 @@
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 组件位置枚举类型

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using System;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 查询组件

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,4 +1,4 @@
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 查询条件实体类

View File

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -3,7 +3,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Select 组件基类

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using System;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,4 +1,4 @@
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 选项类

View File

@ -1,8 +1,8 @@
using Bootstrap.Admin.Models;
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Shared;
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 侧边栏组件

View File

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 数据绑定提交弹窗组件

View File

@ -1,10 +1,10 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Extensions;
using Bootstrap.Admin.Pages.Shared;
using Bootstrap.Security;
using Microsoft.AspNetCore.Components;
using System.Threading.Tasks;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
///

View File

@ -1,5 +1,5 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Extensions;
using Bootstrap.Admin.Pages.Shared;
using Bootstrap.Security;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
@ -8,7 +8,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// TabSet 组件类
@ -84,7 +84,7 @@ namespace Bootstrap.Admin.Components
Tabs.ForEach(t => t.SetActive(false));
Tabs.Add(tab);
Pages.ForEach(p => p.Active = false);
Pages.Add(new PageContentAttributes() { Id = menu.Id, Name = menu.Url.ToBlazorMenuUrl(), Active = true });
Pages.Add(new PageContentAttributes() { Id = menu.Id, Name = menu.Url.Replace("~/", ""), Active = true });
}
else
{

View File

@ -1,5 +1,5 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Shared;
using Bootstrap.Admin.Pages.Extensions;
using Bootstrap.Admin.Pages.Shared;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.JSInterop;
@ -7,7 +7,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 表格组件类
@ -393,7 +393,9 @@ namespace Bootstrap.Admin.Components
{
if (SelectedItems.Count == 1)
{
#nullable disable
EditModel = SelectedItems[0].Clone();
#nullable restore
EditModal?.Toggle();
}
else

View File

@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Table Header 组件

View File

@ -1,9 +1,9 @@
using System;
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Pages.Extensions;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Table Header 表头组件

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Table Toolbar 组件

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 表格 Toolbar 按钮组件

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Table Toolbar 按钮呈现组件

View File

@ -1,9 +1,9 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Pages.Extensions;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Toast 组件基类

View File

@ -1,4 +1,4 @@
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Toast 组件类型

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// Toggle 开关组件

View File

@ -1,4 +1,4 @@
using Bootstrap.Admin.Extensions;
using Bootstrap.Admin.Pages.Extensions;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.JSInterop;
@ -8,7 +8,7 @@ using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Linq;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 内置验证组件基类

View File

@ -3,7 +3,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Bootstrap.Admin.Components
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 验证组件基类

View File

@ -1,9 +1,8 @@
using Bootstrap.Admin.Components;
using Bootstrap.Admin.Pages.Components;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Components.Forms;
using System.ComponentModel;
namespace Bootstrap.Admin.Extensions
namespace Microsoft.AspNetCore.Components.Forms
{
/// <summary>
///

View File

@ -1,7 +1,6 @@
using Microsoft.JSInterop;
using System.Threading.Tasks;
using System.Threading.Tasks;
namespace Bootstrap.Admin.Extensions
namespace Microsoft.JSInterop
{
/// <summary>
/// JSRuntime 扩展操作类

View File

@ -1,7 +1,7 @@
using System;
using System.Linq;
namespace Bootstrap.Admin.Extensions
namespace Bootstrap.Admin.Pages.Extensions
{
/// <summary>
///

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
namespace Bootstrap.Admin.Extensions
namespace Bootstrap.Admin.Pages.Extensions
{
/// <summary>
/// Url 地址辅助操作类

View File

@ -1,10 +1,10 @@
using Bootstrap.Admin.Components;
using Bootstrap.Admin.Pages.Components;
using Bootstrap.Security;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Bootstrap.Pages.Admin.Components
namespace Bootstrap.Admin.Pages.Views.Admin.Components
{
/// <summary>
/// 字典表维护组件

View File

@ -1,10 +1,10 @@
using Bootstrap.Admin.Components;
using Bootstrap.Admin.Pages.Components;
using Bootstrap.DataAccess;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Bootstrap.Pages.Admin.Components
namespace Bootstrap.Admin.Pages.Views.Admin.Components
{
/// <summary>
/// 部门维护组件

View File

@ -1,4 +1,4 @@
using Bootstrap.Admin.Components;
using Bootstrap.Admin.Pages.Components;
using Bootstrap.DataAccess;
using Bootstrap.Security;
using Microsoft.AspNetCore.Components;
@ -7,7 +7,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace Bootstrap.Pages.Admin.Components
namespace Bootstrap.Admin.Pages.Views.Admin.Components
{
/// <summary>
/// 菜单维护组件

Some files were not shown because too many files have changed in this diff Show More