Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/BootstrapBlazor/Attributes/AutoGenerateBaseAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,69 +6,69 @@
namespace BootstrapBlazor.Components;

/// <summary>
/// AutoGenerateColumn 标签基类,用于 <see cref="Table{TItem}"/> 标识自动生成列
/// Base class for AutoGenerateColumn attribute, used to mark auto-generated columns in <see cref="Table{TItem}"/>
/// </summary>
public abstract class AutoGenerateBaseAttribute : Attribute
{
/// <summary>
/// 获得/设置 当前列是否可编辑 默认为 true 当设置为 false 时自动生成编辑 UI 不生成此列
/// Gets or sets whether the current column is editable. Default is true. When set to false, the auto-generated edit UI will not generate this column.
/// </summary>
[Obsolete("已弃用,是否可编辑改用 Readonly 参数,是否可见改用 Ignore 参数; Deprecated If it is editable, use the Readonly parameter. If it is visible, use the Ignore parameter.")]
[Obsolete("Deprecated. If it is editable, use the Readonly parameter. If it is visible, use the Ignore parameter.")]
[ExcludeFromCodeCoverage]
public bool Editable { get; set; } = true;

/// <summary>
/// 获得/设置 当前列是否渲染 默认为 false 当设置为 true UI 不生成此列
/// Gets or sets whether the current column is rendered. Default is false. When set to true, the UI will not generate this column.
/// </summary>
public bool Ignore { get; set; }

/// <summary>
/// 获得/设置 当前编辑项是否只读 默认为 false
/// Gets or sets whether the current edit item is read-only. Default is false.
/// </summary>
public bool Readonly { get; set; }

/// <summary>
/// 获得/设置 当前编辑项是否显示 默认为 true
/// Gets or sets whether the current edit item is visible. Default is true.
/// </summary>
public bool Visible { get; set; } = true;

/// <summary>
/// 获得/设置 是否允许排序 默认为 false
/// Gets or sets whether sorting is allowed. Default is false.
/// </summary>
public bool Sortable { get; set; }

/// <summary>
/// 获得/设置 是否允许过滤数据 默认为 false
/// Gets or sets whether data filtering is allowed. Default is false.
/// </summary>
public bool Filterable { get; set; }

/// <summary>
/// 获得/设置 是否参与搜索 默认为 false
/// Gets or sets whether the column participates in search. Default is false.
/// </summary>
public bool Searchable { get; set; }

/// <summary>
/// 获得/设置 本列是否允许换行 默认为 false
/// Gets or sets whether text wrapping is allowed in this column. Default is false.
/// </summary>
public bool TextWrap { get; set; }

/// <summary>
/// 获得/设置 本列文本超出省略 默认为 false
/// Gets or sets whether text overflow is ellipsis in this column. Default is false.
/// </summary>
public bool TextEllipsis { get; set; }

/// <summary>
/// 获得/设置 文字对齐方式 默认为 Alignment.None
/// Gets or sets the text alignment. Default is Alignment.None.
/// </summary>
public Alignment Align { get; set; }

/// <summary>
/// 获得/设置 字段鼠标悬停提示 默认为 false
/// Gets or sets whether to show tooltips on mouse hover. Default is false.
/// </summary>
public bool ShowTips { get; set; }

/// <summary>
/// 获得/设置 是否可以拷贝列 默认 false 不可以
/// Gets or sets whether the column can be copied. Default is false.
/// </summary>
public bool ShowCopyColumn { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace BootstrapBlazor.Components;

/// <summary>
/// AutoGenerateColumn 标签类,用于 <see cref="Table{TItem}"/> 标识自动生成列
/// AutoGenerateColumn attribute class, used to mark auto-generated columns in <see cref="Table{TItem}"/>
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class AutoGenerateClassAttribute : AutoGenerateBaseAttribute
Expand Down
Loading