Skip to content

Commit

Permalink
1. 新增按钮样式单选框 TagHelper 标签 <util-radio-button>.
Browse files Browse the repository at this point in the history
  2. 对文字提示, 气泡卡片 ,气泡确认框相关扩展方法进行重构.
  3. 重构输入框自动完成组件, 调整表达式绑定相关设置.
  4. 补齐 <util-list> 相关标签的属性.
  5. 修复在未设置 ngModel, 或已设置 formControlName 时, 输入框 `允许清除` 全局配置导致的问题.
  • Loading branch information
UtilCore committed May 15, 2024
1 parent c9e0e6b commit e90f41f
Show file tree
Hide file tree
Showing 201 changed files with 2,489 additions and 2,244 deletions.
2 changes: 1 addition & 1 deletion build/version.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<VersionPatch>14</VersionPatch>
<VersionPatch>15</VersionPatch>
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Util.AspNetCore/08-Util.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Util.Data.Core/01-Util.Data.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.12" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.14" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="3.21.140" />
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="23.4.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Npgsql" Version="8.0.2" />
<PackageReference Include="Npgsql" Version="8.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Oracle.EntityFrameworkCore" Version="8.21.140" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="8.23.40" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Util.Generators/Configuration/ProjectOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public ProjectOptions() {
/// </summary>
public string ApiPort { get; set; }
/// <summary>
/// UI项目端口
/// </summary>
public string UiPort { get; set; }
/// <summary>
/// 是否启用架构
/// </summary>
public bool EnableSchema { get; set; }
Expand Down
1 change: 1 addition & 0 deletions src/Util.Generators/Contexts/GeneratorContextBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ protected async Task<ProjectContext> CreateProjectContext( GeneratorContext gene
I18n = projectOptions.I18n,
ProjectType = projectOptions.ProjectType,
ApiPort = projectOptions.ApiPort,
UiPort = projectOptions.UiPort,
EnableSchema = projectOptions.EnableSchema,
Extend = projectOptions.Extend
};
Expand Down
6 changes: 6 additions & 0 deletions src/Util.Generators/Contexts/ProjectContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public ProjectContext( GeneratorContext generatorContext ) {
/// </summary>
public string ApiPort { get; set; }

/// <summary>
/// UI项目端口
/// </summary>
public string UiPort { get; set; }

/// <summary>
/// 项目类型
/// </summary>
Expand Down Expand Up @@ -141,6 +146,7 @@ public ProjectContext Clone( GeneratorContext generatorContext ) {
I18n = I18n,
ProjectType = ProjectType,
ApiPort = ApiPort,
UiPort = UiPort,
EnableSchema = EnableSchema,
Extend = Extend
};
Expand Down
2 changes: 1 addition & 1 deletion src/Util.Http/07-Util.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.5" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Util.Localization/09-Util.Localization.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.4" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Util.Logging.Serilog/02-Util.Logging.Serilog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="7.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Util.Microservices.Dapr/03-Util.Microservices.Dapr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.13.0" />
<PackageReference Include="Dapr.Extensions.Configuration" Version="1.13.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.13.1" />
<PackageReference Include="Dapr.Extensions.Configuration" Version="1.13.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.4" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Polly" Version="8.3.1" />
<PackageReference Include="Polly" Version="8.4.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Util.Scheduling.Quartz/02-Util.Scheduling.Quartz.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Quartz" Version="3.8.1" />
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.8.1" />
<PackageReference Include="Quartz" Version="3.9.0" />
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.9.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Util.Templates.Razor/02-Util.Templates.Razor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.29" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.30" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
</ItemGroup>
</Project>
14 changes: 13 additions & 1 deletion src/Util.Ui.Angular/Configs/AngularConst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public static class AngularConst {
/// </summary>
public const string BindOptional = "bind-optional";
/// <summary>
/// 当前锚点
/// </summary>
public const string BindCurrentAnchor = "bind-current-anchor";
/// <summary>
/// 可选帮助
/// </summary>
public const string BindOptionalHelp = "bind-optional-help";
Expand All @@ -57,6 +61,10 @@ public static class AngularConst {
/// </summary>
public const string BindOptionalHelpColor = "bind-optional-help-color";
/// <summary>
/// 弹出确认自动聚焦
/// </summary>
public const string BindPopconfirmAutoFocus = "bind-popconfirm-auto-focus";
/// <summary>
/// 间距
/// </summary>
public const string BindGutter = "bind-gutter";
Expand Down Expand Up @@ -1505,6 +1513,10 @@ public static class AngularConst {
/// </summary>
public const string BindTooltipColor = "bind-tooltip-color";
/// <summary>
/// 提示可见性
/// </summary>
public const string BindonTooltipVisible = "bindon-tooltip-visible";
/// <summary>
/// 提示移入延时
/// </summary>
public const string BindTooltipMouseEnterDelay = "bind-tooltip-mouse-enter-delay";
Expand Down Expand Up @@ -1643,7 +1655,7 @@ public static class AngularConst {
/// <summary>
/// 弹出确认是否可见
/// </summary>
public const string BindPopconfirmVisible = "bind-popconfirm-visible";
public const string BindonPopconfirmVisible = "bindon-popconfirm-visible";
/// <summary>
/// 弹出确认显示箭头
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Util.Ui.NgZorro/03-Util.Ui.NgZorro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
25 changes: 25 additions & 0 deletions src/Util.Ui.NgZorro/Components/Anchors/AnchorTagHelper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Razor.TagHelpers;
using Util.Ui.Angular.TagHelpers;
using Util.Ui.NgZorro.Components.Anchors.Renders;
using Util.Ui.NgZorro.Enums;
using Util.Ui.Renders;

namespace Util.Ui.NgZorro.Components.Anchors;
Expand Down Expand Up @@ -35,10 +36,34 @@ public class AnchorTagHelper : AngularTagHelperBase {
/// </summary>
public string BindContainer { get; set; }
/// <summary>
/// nzCurrentAnchor,自定义高亮的锚点
/// </summary>
public string CurrentAnchor { get; set; }
/// <summary>
/// [nzCurrentAnchor],自定义高亮的锚点
/// </summary>
public string BindCurrentAnchor { get; set; }
/// <summary>
/// [nzTargetOffset],锚点滚动偏移量,默认与 offsetTop 相同, 类型: number
/// </summary>
public string TargetOffset { get; set; }
/// <summary>
/// nzDirection,设置导航方向, 可选值: 'vertical' | 'horizontal', 默认值: 'vertical'
/// </summary>
public AnchorDirection Direction { get; set; }
/// <summary>
/// [nzDirection],设置导航方向, 可选值: 'vertical' | 'horizontal', 默认值: 'vertical'
/// </summary>
public string BindDirection { get; set; }
/// <summary>
/// (nzClick),单击事件,类型: EventEmitter&lt;string>
/// </summary>
public string OnClick { get; set; }
/// <summary>
/// (nzChange),锚点链接变更事件,类型: EventEmitter&lt;string>
/// </summary>
public string OnChange { get; set; }
/// <summary>
/// (nzScroll), 滚动事件,滚动至指定锚点时触发,类型: EventEmitter&lt;NzAnchorLinkComponent>
/// </summary>
public string OnScroll { get; set; }
Expand Down
33 changes: 32 additions & 1 deletion src/Util.Ui.NgZorro/Components/Anchors/Builders/AnchorBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Util.Ui.Angular.Builders;
using Util.Ui.Angular.Configs;
using Util.Ui.NgZorro.Enums;

namespace Util.Ui.NgZorro.Components.Anchors.Builders;

Expand Down Expand Up @@ -60,11 +61,38 @@ public AnchorBuilder Container() {
return this;
}

/// <summary>
/// 配置自定义高亮的锚点
/// </summary>
public AnchorBuilder CurrentAnchor() {
AttributeIfNotEmpty( "nzCurrentAnchor", _config.GetValue( UiConst.CurrentAnchor ) );
AttributeIfNotEmpty( "[nzCurrentAnchor]", _config.GetValue( AngularConst.BindCurrentAnchor ) );
return this;
}

/// <summary>
/// 配置锚点滚动偏移量
/// </summary>
public AnchorBuilder TargetOffset() {
AttributeIfNotEmpty( "[nzTargetOffset]", _config.GetValue( UiConst.TargetOffset ) );
return this;
}

/// <summary>
/// 配置方向
/// </summary>
public AnchorBuilder Direction() {
AttributeIfNotEmpty( "nzDirection", _config.GetValue<AnchorDirection?>( UiConst.Direction )?.Description() );
AttributeIfNotEmpty( "[nzDirection]", _config.GetValue( AngularConst.BindDirection ) );
return this;
}

/// <summary>
/// 配置事件
/// </summary>
public AnchorBuilder Events() {
AttributeIfNotEmpty( "(nzClick)", _config.GetValue( UiConst.OnClick ) );
AttributeIfNotEmpty( "(nzChange)", _config.GetValue( UiConst.OnChange ) );
AttributeIfNotEmpty( "(nzScroll)", _config.GetValue( UiConst.OnScroll ) );
return this;
}
Expand All @@ -74,6 +102,9 @@ public AnchorBuilder Events() {
/// </summary>
public override void Config() {
base.Config();
Affix().Bounds().OffsetTop().ShowInkInFixed().Container().Events();
Affix().Bounds().OffsetTop().ShowInkInFixed()
.Container().CurrentAnchor().TargetOffset()
.Direction()
.Events();
}
}
12 changes: 11 additions & 1 deletion src/Util.Ui.NgZorro/Components/Anchors/Builders/LinkBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Util.Ui.Angular.Builders;
using Util.Ui.Angular.Configs;
using Util.Ui.Enums;

namespace Util.Ui.NgZorro.Components.Anchors.Builders;

Expand Down Expand Up @@ -28,6 +29,15 @@ public LinkBuilder Href() {
return this;
}

/// <summary>
/// 配置链接打开目标
/// </summary>
public LinkBuilder Target() {
AttributeIfNotEmpty( "nzTarget", _config.GetValue<ATarget?>( UiConst.Target )?.Description() );
AttributeIfNotEmpty( "[nzTarget]", _config.GetValue( AngularConst.BindTarget ) );
return this;
}

/// <summary>
/// 配置标题
/// </summary>
Expand All @@ -42,6 +52,6 @@ public LinkBuilder Title() {
/// </summary>
public override void Config() {
base.Config();
Href().Title();
Href().Target().Title();
}
}
Loading

0 comments on commit e90f41f

Please sign in to comment.