refactor: 代码重构 Users 页面

This commit is contained in:
Argo-Tianyi 2021-12-15 22:34:55 +08:00
parent 99477b8ede
commit ede1f1fead
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@
<TableColumn @bind-Field="@context.Description" Sortable="true" Filterable="true"></TableColumn> <TableColumn @bind-Field="@context.Description" Sortable="true" Filterable="true"></TableColumn>
</ColumnsTemplete> </ColumnsTemplete>
<RowButtonTemplate> <RowButtonTemplate>
<TableCellButton Size="Size.ExtraSmall" Color="Color.Warning" Icon="fa fa-bank" Text="分配部门" OnClickCallback="() => OnAssignmentDept(context)" /> <TableCellButton Size="Size.ExtraSmall" Color="Color.Warning" Icon="fa fa-bank" Text="分配部门" OnClick="() => OnAssignmentDept(context)" />
<TableCellButton Size="Size.ExtraSmall" Color="Color.Info" Icon="fa fa-sitemap" Text="分配角色" OnClickCallback="() => OnAssignmentRoles(context)" /> <TableCellButton Size="Size.ExtraSmall" Color="Color.Info" Icon="fa fa-sitemap" Text="分配角色" OnClick="() => OnAssignmentRoles(context)" />
</RowButtonTemplate> </RowButtonTemplate>
</BlazorTable> </BlazorTable>

View File

@ -16,7 +16,7 @@ namespace BootstrapAdmin.Web.Pages.Admin
{ {
var option = new DialogOption() var option = new DialogOption()
{ {
Title = $"分配部门 - {user.ToString()}", Title = $"分配部门 - {user}",
Component = BootstrapDynamicComponent.CreateComponent<UserGroup>(new Dictionary<string, object> Component = BootstrapDynamicComponent.CreateComponent<UserGroup>(new Dictionary<string, object>
{ {
[nameof(UserGroup.UserName)] = user.UserName [nameof(UserGroup.UserName)] = user.UserName
@ -30,7 +30,7 @@ namespace BootstrapAdmin.Web.Pages.Admin
{ {
var option = new DialogOption() var option = new DialogOption()
{ {
Title = $"分配角色 - {user.ToString()}", Title = $"分配角色 - {user}",
Component = BootstrapDynamicComponent.CreateComponent<UserRole>(new Dictionary<string, object> Component = BootstrapDynamicComponent.CreateComponent<UserRole>(new Dictionary<string, object>
{ {
[nameof(UserGroup.UserName)] = user.UserName [nameof(UserGroup.UserName)] = user.UserName