diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpBorderTagHelper.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpBorderTagHelper.cs index 2ab667d08b..bc7a6f9829 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpBorderTagHelper.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpBorderTagHelper.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Border [HtmlTargetElement(Attributes = "abp-border")] public class AbpBorderTagHelper : AbpTagHelper { - public AbpBorderType AbpBorder { get; set; } = AbpBorderType._; + public AbpBorderType AbpBorder { get; set; } = AbpBorderType.Default; public AbpBorderTagHelper(AbpBorderTagHelperService tagHelperService) : base(tagHelperService) diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpBorderType.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpBorderType.cs index 08bdfb92cb..14b1684876 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpBorderType.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpBorderType.cs @@ -2,7 +2,7 @@ { public enum AbpBorderType { - _, + Default, _0, Primary, Secondary, diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedTagHelper.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedTagHelper.cs new file mode 100644 index 0000000000..f8c3489cc9 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedTagHelper.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Razor.TagHelpers; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Border +{ + [HtmlTargetElement(Attributes = "abp-rounded")] + public class AbpRoundedTagHelper : AbpTagHelper + { + public AbpRoundedType AbpRounded { get; set; } = AbpRoundedType.Default; + + public AbpRoundedTagHelper(AbpRoundedTagHelperService tagHelperService) + : base(tagHelperService) + { + + } + } +} diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedTagHelperService.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedTagHelperService.cs new file mode 100644 index 0000000000..89436785ba --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedTagHelperService.cs @@ -0,0 +1,20 @@ +using Microsoft.AspNetCore.Razor.TagHelpers; +using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Border +{ + public class AbpRoundedTagHelperService : AbpTagHelperService + { + public override void Process(TagHelperContext context, TagHelperOutput output) + { + var roundedClass = "rounded"; + + if (TagHelper.AbpRounded != AbpRoundedType.Default) + { + roundedClass += "-" + TagHelper.AbpRounded.ToString().ToLowerInvariant().Replace("_",""); + } + + output.Attributes.AddClass(roundedClass); + } + } +} \ No newline at end of file diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedType.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedType.cs new file mode 100644 index 0000000000..1910ffc714 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Border/AbpRoundedType.cs @@ -0,0 +1,12 @@ +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Border +{ + public enum AbpRoundedType + { + Default, + _0, + Top, + Right, + Left, + Bottom + } +} \ No newline at end of file