!2687 fix(#I53KMB): update the ShowExtendEditButtonn/ShowExtendDeleteButton default value to true

* doc: 更新参数说明文档
* fix: 更新显示 编辑删除 按钮 默认值
This commit is contained in:
Argo 2022-04-19 16:27:54 +00:00
parent e7fa409949
commit 0c8e009e73
2 changed files with 118 additions and 94 deletions

View File

@ -151,8 +151,8 @@ public partial class Tables
ValueList = " — ", ValueList = " — ",
DefaultValue = "OrdinalIgnoreCase" DefaultValue = "OrdinalIgnoreCase"
}, },
new() new()
{ {
Name = nameof(IEditorItem.LookUpServiceKey), Name = nameof(IEditorItem.LookUpServiceKey),
Description = "LookupService 服务获取 Lookup 数据集合键值", Description = "LookupService 服务获取 Lookup 数据集合键值",
Type = "string", Type = "string",
@ -265,13 +265,21 @@ public partial class Tables
}, },
new() new()
{ {
Name = "Category", Name = nameof(TableColumn<Foo, string>.GroupName),
Description = "当前属性分组", Description = "当前属性分组",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{
Name = nameof(TableColumn<Foo, string>.GroupOrder),
Description = "当前属性分组顺序",
Type = "int",
ValueList = " — ",
DefaultValue = " — "
},
new()
{ {
Name = "ShownWithBreakPoint", Name = "ShownWithBreakPoint",
Description = "显示节点阈值", Description = "显示节点阈值",
@ -373,7 +381,7 @@ public partial class Tables
DefaultValue = "130" DefaultValue = "130"
}, },
new() new()
{ {
Name = "RenderModelResponsiveWidth", Name = "RenderModelResponsiveWidth",
Description = "组件布局模式自动切换阈值", Description = "组件布局模式自动切换阈值",
Type = "int", Type = "int",
@ -693,7 +701,7 @@ public partial class Tables
DefaultValue = "true" DefaultValue = "true"
}, },
new() new()
{ {
Name = "ShowDeleteButton", Name = "ShowDeleteButton",
Description = "显示删除按钮", Description = "显示删除按钮",
Type = "boolean", Type = "boolean",
@ -701,7 +709,7 @@ public partial class Tables
DefaultValue = "true" DefaultValue = "true"
}, },
new() new()
{ {
Name = "ShowDeleteButtonCallback", Name = "ShowDeleteButtonCallback",
Description = "显示行内删除按钮未设置时使用 ShowEditButton 值", Description = "显示行内删除按钮未设置时使用 ShowEditButton 值",
Type = "boolean", Type = "boolean",
@ -716,344 +724,360 @@ public partial class Tables
ValueList = "true / false", ValueList = "true / false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = nameof(Table<Foo>.ShowExtendEditButton),
Description = "显示行编辑操作按钮",
Type = "boolean",
ValueList = "true / false",
DefaultValue = "true"
},
new()
{
Name = nameof(Table<Foo>.ShowExtendDeleteButton),
Description = "显示行删除操作按钮",
Type = "boolean",
ValueList = "true / false",
DefaultValue = "true"
},
new()
{
Name = "ShowSkeleton", Name = "ShowSkeleton",
Description = "加载时是否显示骨架屏", Description = "加载时是否显示骨架屏",
Type = "boolean", Type = "boolean",
ValueList = "true / false", ValueList = "true / false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = "ShowColumnList", Name = "ShowColumnList",
Description = "是否显示列显示/隐藏控制按钮", Description = "是否显示列显示/隐藏控制按钮",
Type = "boolean", Type = "boolean",
ValueList = "true / false", ValueList = "true / false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = "ShowEmpty", Name = "ShowEmpty",
Description = "是否显示无数据提示", Description = "是否显示无数据提示",
Type = "boolean", Type = "boolean",
ValueList = "true / false", ValueList = "true / false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = "ShowToastAfterSaveOrDeleteModel", Name = "ShowToastAfterSaveOrDeleteModel",
Description = "保存/删除失败后是否显示 Toast 提示框", Description = "保存/删除失败后是否显示 Toast 提示框",
Type = "boolean", Type = "boolean",
ValueList = "true / false", ValueList = "true / false",
DefaultValue = "true" DefaultValue = "true"
}, },
new() new()
{ {
Name = "TreeIcon", Name = "TreeIcon",
Description = "树形数据行小箭头", Description = "树形数据行小箭头",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = "fa-caret-right" DefaultValue = "fa-caret-right"
}, },
new() new()
{ {
Name = "UseComponentWidth", Name = "UseComponentWidth",
Description = "组件渲染模式是否使用组件宽度来判断", Description = "组件渲染模式是否使用组件宽度来判断",
Type = "boolean", Type = "boolean",
ValueList = "true|false", ValueList = "true|false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = "ScrollingDialogContent", Name = "ScrollingDialogContent",
Description = "编辑弹窗框是否为内部出现滚动条", Description = "编辑弹窗框是否为内部出现滚动条",
Type = "boolean", Type = "boolean",
ValueList = "true / false", ValueList = "true / false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = "FixedExtendButtonsColumn", Name = "FixedExtendButtonsColumn",
Description = "是否固定扩展按钮列", Description = "是否固定扩展按钮列",
Type = "boolean", Type = "boolean",
ValueList = "true / false", ValueList = "true / false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = "OnQueryAsync", Name = "OnQueryAsync",
Description = "异步查询回调方法", Description = "异步查询回调方法",
Type = "Func<QueryPageOptions, Task<QueryData<TItem>>>", Type = "Func<QueryPageOptions, Task<QueryData<TItem>>>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnAddAsync", Name = "OnAddAsync",
Description = "新建按钮回调方法", Description = "新建按钮回调方法",
Type = "Func<Task<TItem>>", Type = "Func<Task<TItem>>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = nameof(Table<Foo>.OnColumnCreating), Name = nameof(Table<Foo>.OnColumnCreating),
Description = "列创建时回调委托方法", Description = "列创建时回调委托方法",
Type = "Func<List<ITableColumn>,Task>", Type = "Func<List<ITableColumn>,Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = nameof(Table<Foo>.OnDoubleClickCellCallback), Name = nameof(Table<Foo>.OnDoubleClickCellCallback),
Description = "设置单元格双击事件", Description = "设置单元格双击事件",
Type = "Func<string, object, object?, Task>", Type = "Func<string, object, object?, Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnDeleteAsync", Name = "OnDeleteAsync",
Description = "删除按钮异步回调方法", Description = "删除按钮异步回调方法",
Type = "Func<IEnumerable<TItem>, Task<bool>>", Type = "Func<IEnumerable<TItem>, Task<bool>>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnEditAsync", Name = "OnEditAsync",
Description = "编辑按钮异步回调方法", Description = "编辑按钮异步回调方法",
Type = "Func<TItem, Task>", Type = "Func<TItem, Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnSaveAsync", Name = "OnSaveAsync",
Description = "保存按钮异步回调方法", Description = "保存按钮异步回调方法",
Type = "Func<TItem, Task>", Type = "Func<TItem, Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnResetSearchAsync", Name = "OnResetSearchAsync",
Description = "重置搜索按钮异步回调方法", Description = "重置搜索按钮异步回调方法",
Type = "Func<TItem, Task>", Type = "Func<TItem, Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnClickRowCallback", Name = "OnClickRowCallback",
Description = "点击行回调委托方法", Description = "点击行回调委托方法",
Type = "Func<TItem, Task>", Type = "Func<TItem, Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnAfterSaveAsync", Name = "OnAfterSaveAsync",
Description = "保存数据后异步回调方法", Description = "保存数据后异步回调方法",
Type = "Func<TItem, Task>", Type = "Func<TItem, Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = nameof(BootstrapBlazor.Components.Table<Foo>.OnAfterRenderCallback), Name = nameof(BootstrapBlazor.Components.Table<Foo>.OnAfterRenderCallback),
Description = "表格渲染完毕后回调方法", Description = "表格渲染完毕后回调方法",
Type = "Func<Table<TItem>, Task>", Type = "Func<Table<TItem>, Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnTreeExpand", Name = "OnTreeExpand",
Description = "树形数据节点展开式回调委托方法", Description = "树形数据节点展开式回调委托方法",
Type = "Func<TItem, Task<IEnumerable<TItem>>>", Type = "Func<TItem, Task<IEnumerable<TItem>>>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "OnDoubleClickRowCallback", Name = "OnDoubleClickRowCallback",
Description = "双击行回调委托方法", Description = "双击行回调委托方法",
Type = "Func<TItem, Task>", Type = "Func<TItem, Task>",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "SortIcon", Name = "SortIcon",
Description = "排序默认图标", Description = "排序默认图标",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = "fa fa-sort" DefaultValue = "fa fa-sort"
}, },
new() new()
{ {
Name = "SortIconAsc", Name = "SortIconAsc",
Description = "排序升序图标", Description = "排序升序图标",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = "fa fa-sort-asc" DefaultValue = "fa fa-sort-asc"
}, },
new() new()
{ {
Name = "SortIconDesc", Name = "SortIconDesc",
Description = "排序降序图标", Description = "排序降序图标",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = "fa fa-sort-desc" DefaultValue = "fa fa-sort-desc"
}, },
new() new()
{ {
Name = "EditDialogSaveButtonText", Name = "EditDialogSaveButtonText",
Description = "编辑弹窗中保存按钮文字", Description = "编辑弹窗中保存按钮文字",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = nameof(Table<Foo>.EditDialogIsDraggable), Name = nameof(Table<Foo>.EditDialogIsDraggable),
Description = "编辑弹窗是否可拖拽", Description = "编辑弹窗是否可拖拽",
Type = "bool", Type = "bool",
ValueList = "true|false", ValueList = "true|false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = nameof(Table<Foo>.EditDialogShowMaximizeButton), Name = nameof(Table<Foo>.EditDialogShowMaximizeButton),
Description = "编辑弹窗是否显示最大化按钮", Description = "编辑弹窗是否显示最大化按钮",
Type = "bool", Type = "bool",
ValueList = "true|false", ValueList = "true|false",
DefaultValue = "true" DefaultValue = "true"
}, },
new() new()
{ {
Name = "EditDialogSize", Name = "EditDialogSize",
Description = "编辑弹窗大小", Description = "编辑弹窗大小",
Type = "Size", Type = "Size",
ValueList = " — ", ValueList = " — ",
DefaultValue = "Large" DefaultValue = "Large"
}, },
new() new()
{ {
Name = nameof(Table<Foo>.SearchDialogIsDraggable), Name = nameof(Table<Foo>.SearchDialogIsDraggable),
Description = "搜索弹窗是否可拖拽", Description = "搜索弹窗是否可拖拽",
Type = "bool", Type = "bool",
ValueList = "true|false", ValueList = "true|false",
DefaultValue = "false" DefaultValue = "false"
}, },
new() new()
{ {
Name = nameof(Table<Foo>.SearchDialogShowMaximizeButton), Name = nameof(Table<Foo>.SearchDialogShowMaximizeButton),
Description = "搜索弹窗是否显示最大化按钮", Description = "搜索弹窗是否显示最大化按钮",
Type = "bool", Type = "bool",
ValueList = "true|false", ValueList = "true|false",
DefaultValue = "true" DefaultValue = "true"
}, },
new() new()
{ {
Name = "SearchDialogSize", Name = "SearchDialogSize",
Description = "搜索弹窗大小", Description = "搜索弹窗大小",
Type = "Size", Type = "Size",
ValueList = " — ", ValueList = " — ",
DefaultValue = "Large" DefaultValue = "Large"
}, },
new() new()
{ {
Name = "AddModalTitle", Name = "AddModalTitle",
Description = "新建数据弹窗 Title", Description = "新建数据弹窗 Title",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "EditModalTitle", Name = "EditModalTitle",
Description = "编辑数据弹窗 Title", Description = "编辑数据弹窗 Title",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "UnsetText", Name = "UnsetText",
Description = "未设置排序时 tooltip 显示文字", Description = "未设置排序时 tooltip 显示文字",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = "点击升序" DefaultValue = "点击升序"
}, },
new() new()
{ {
Name = "SortAscText", Name = "SortAscText",
Description = "升序排序时 tooltip 显示文字", Description = "升序排序时 tooltip 显示文字",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = "点击降序" DefaultValue = "点击降序"
}, },
new() new()
{ {
Name = "SortDescText", Name = "SortDescText",
Description = "降序排序时 tooltip 显示文字", Description = "降序排序时 tooltip 显示文字",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = "取消排序" DefaultValue = "取消排序"
}, },
new() new()
{ {
Name = "RenderMode", Name = "RenderMode",
Description = "Table 组件布局模式设置", Description = "Table 组件布局模式设置",
Type = "TableRenderMode", Type = "TableRenderMode",
ValueList = "Auto|Table|CardView", ValueList = "Auto|Table|CardView",
DefaultValue = "Auto" DefaultValue = "Auto"
}, },
new() new()
{ {
Name = "EmptyText", Name = "EmptyText",
Description = "无数据时显示文本", Description = "无数据时显示文本",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = nameof(Table<MethodItem>.EmptyImage), Name = nameof(Table<MethodItem>.EmptyImage),
Description = "无数据时显示图片链接地址", Description = "无数据时显示图片链接地址",
Type = "string", Type = "string",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "EmptyTemplate", Name = "EmptyTemplate",
Description = "无数据时显示模板", Description = "无数据时显示模板",
Type = "RenderFragment", Type = "RenderFragment",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "EditDialogItemsPerRow", Name = "EditDialogItemsPerRow",
Description = "每行显示组件数量", Description = "每行显示组件数量",
Type = "int?", Type = "int?",
ValueList = " — ", ValueList = " — ",
DefaultValue = " — " DefaultValue = " — "
}, },
new() new()
{ {
Name = "EditDialogRowType", Name = "EditDialogRowType",
Description = "设置组件布局方式", Description = "设置组件布局方式",
Type = "RowType", Type = "RowType",
ValueList = "Row|Inline", ValueList = "Row|Inline",
DefaultValue = "Row" DefaultValue = "Row"
}, },
new() new()
{ {
Name = "EditDialogLabelAlign", Name = "EditDialogLabelAlign",
Description = "Inline 布局模式下标签对齐方式", Description = "Inline 布局模式下标签对齐方式",
Type = "Alignment", Type = "Alignment",

View File

@ -86,13 +86,13 @@ public partial class Table<TItem>
/// 获得/设置 是否显示行内扩展编辑按钮 默认 true 显示 /// 获得/设置 是否显示行内扩展编辑按钮 默认 true 显示
/// </summary> /// </summary>
[Parameter] [Parameter]
public bool ShowExtendEditButton { get; set; } public bool ShowExtendEditButton { get; set; } = true;
/// <summary> /// <summary>
/// 获得/设置 是否显示行内扩展编辑按钮 默认 true 显示 /// 获得/设置 是否显示行内扩展编辑按钮 默认 true 显示
/// </summary> /// </summary>
[Parameter] [Parameter]
public bool ShowExtendDeleteButton { get; set; } public bool ShowExtendDeleteButton { get; set; } = true;
/// <summary> /// <summary>
/// 获得/设置 是否固定扩展按钮列 默认为 false 不固定 /// 获得/设置 是否固定扩展按钮列 默认为 false 不固定