refactor: 增加 Display 标签
This commit is contained in:
parent
b0651c755e
commit
bf4fedc544
|
@ -1,5 +1,7 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace BootstrapAdmin.DataAccess.Models
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -13,23 +15,30 @@ namespace BootstrapAdmin.DataAccess.Models
|
|||
public string? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 字典分类
|
||||
/// 获得/设置 字典标签
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[Display(Name = "字典标签")]
|
||||
public string Category { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 字典名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[Display(Name = "字典名称")]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 字典字典值
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[Display(Name = "字典代码")]
|
||||
public string Code { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 字典定义值 0 表示系统使用,1 表示用户自定义 默认为 1
|
||||
/// </summary>
|
||||
[Display(Name = "字典类型")]
|
||||
public EnumDictDefine Define { get; set; } = EnumDictDefine.Customer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
<BlazorTable TItem="DataAccess.Models.Dict" IsPagination="false" TableSearchModel="DictsSearchModel">
|
||||
<ColumnsTemplete>
|
||||
<TableColumn @bind-Field="context.Category" Text="字典标签" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
|
||||
<TableColumn @bind-Field="context.Name" Text="字典名称" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
|
||||
<TableColumn @bind-Field="context.Code" Text="字典代码" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
|
||||
<TableColumn @bind-Field="context.Define" Text="字典类型" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
|
||||
<TableColumn @bind-Field="context.Category" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
|
||||
<TableColumn @bind-Field="context.Name" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
|
||||
<TableColumn @bind-Field="context.Code" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
|
||||
<TableColumn @bind-Field="context.Define" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
|
||||
</ColumnsTemplete>
|
||||
<CustomerSearchTemplate>
|
||||
@if (context is DictsSearchModel searchModel)
|
||||
|
|
Loading…
Reference in New Issue