-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
新增底部工具栏标签<util-footer-toolbar>, 封装 Ng-Alain 底部工具栏 <footer-toolbar> 组件.
新增查询表单标签 <util-search-form>,自动设置内部栅格列 span. <util-table> 标签新增 enable-custom-column 属性,开启自定义列设置. <util-a> 标签新增 show-table-settings 属性,点击弹出表格自定义列设置界面. <util-a> 标签新增 is-search 属性, 创建具有展开和收起效果的查询按钮. 修复 Util.Data.EntityFrameworkCore.StoreBase 更新实体验证并发导致的 bug
- Loading branch information
Showing
46 changed files
with
2,159 additions
and
860 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/Util.Ui.NgAlain/Components/FooterToolbars/Builders/FooterToolbarBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Util.Ui.Angular.Builders; | ||
using Util.Ui.Angular.Configs; | ||
using Util.Ui.Configs; | ||
|
||
namespace Util.Ui.NgAlain.Components.FooterToolbars.Builders; | ||
|
||
/// <summary> | ||
/// 底部工具栏生成器 | ||
/// </summary> | ||
public class FooterToolbarBuilder : AngularTagBuilder { | ||
/// <summary> | ||
/// 配置 | ||
/// </summary> | ||
private readonly Config _config; | ||
/// <summary> | ||
/// 初始化底部工具栏生成器 | ||
/// </summary> | ||
/// <param name="config">配置</param> | ||
public FooterToolbarBuilder( Config config ) : base( config, "footer-toolbar" ) { | ||
_config = config; | ||
} | ||
|
||
/// <summary> | ||
/// 配置错误收集 | ||
/// </summary> | ||
public FooterToolbarBuilder ErrorCollect() { | ||
AttributeIfNotEmpty( "[errorCollect]", _config.GetValue( UiConst.ErrorCollect ) ); | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// 配置额外信息 | ||
/// </summary> | ||
public FooterToolbarBuilder Extra() { | ||
AttributeIfNotEmpty( "extra", _config.GetValue( UiConst.Extra ) ); | ||
AttributeIfNotEmpty( "[extra]", _config.GetValue( AngularConst.BindExtra ) ); | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// 配置 | ||
/// </summary> | ||
public override void Config() { | ||
base.Config(); | ||
ErrorCollect().Extra(); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Util.Ui.NgAlain/Components/FooterToolbars/FooterToolbarTagHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Microsoft.AspNetCore.Razor.TagHelpers; | ||
using Util.Ui.Angular.TagHelpers; | ||
using Util.Ui.Configs; | ||
using Util.Ui.NgAlain.Components.FooterToolbars.Renders; | ||
using Util.Ui.Renders; | ||
|
||
namespace Util.Ui.NgAlain.Components.FooterToolbars; | ||
|
||
/// <summary> | ||
/// ng-alain 底部工具栏,生成的标签为<footer-toolbar></footer-toolbar> | ||
/// </summary> | ||
[HtmlTargetElement( "util-footer-toolbar" )] | ||
public class FooterToolbarTagHelper : AngularTagHelperBase { | ||
/// <summary> | ||
/// [errorCollect],是否收集表单错误,需要放入 form 标签内, 默认值: false | ||
/// </summary> | ||
public string ErrorCollect { get; set; } | ||
/// <summary> | ||
/// extra,额外信息,显示在左边 | ||
/// </summary> | ||
public string Extra { get; set; } | ||
/// <summary> | ||
/// [extra],额外信息,显示在左边 | ||
/// </summary> | ||
public string BindExtra { get; set; } | ||
|
||
/// <inheritdoc /> | ||
protected override IRender GetRender( TagHelperContext context, TagHelperOutput output, TagHelperContent content ) { | ||
var config = new Config( context, output, content ); | ||
return new FooterToolbarRender( config ); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/Util.Ui.NgAlain/Components/FooterToolbars/Renders/FooterToolbarRender.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Util.Ui.Angular.Extensions; | ||
using Util.Ui.Builders; | ||
using Util.Ui.Configs; | ||
using Util.Ui.NgAlain.Components.FooterToolbars.Builders; | ||
using Util.Ui.Renders; | ||
|
||
namespace Util.Ui.NgAlain.Components.FooterToolbars.Renders; | ||
|
||
/// <summary> | ||
/// 底部工具栏渲染器 | ||
/// </summary> | ||
public class FooterToolbarRender : RenderBase { | ||
/// <summary> | ||
/// 配置 | ||
/// </summary> | ||
private readonly Config _config; | ||
|
||
/// <summary> | ||
/// 初始化底部工具栏渲染器 | ||
/// </summary> | ||
/// <param name="config">配置</param> | ||
public FooterToolbarRender( Config config ) { | ||
_config = config; | ||
} | ||
|
||
/// <summary> | ||
/// 获取标签生成器 | ||
/// </summary> | ||
protected override TagBuilder GetTagBuilder() { | ||
var builder = new FooterToolbarBuilder( _config ); | ||
builder.Config(); | ||
return builder; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override IHtmlContent Clone() { | ||
return new FooterToolbarRender( _config.CopyRemoveAttributes() ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.