diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/If/AbpIfTagHelper.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/If/AbpIfTagHelper.cs new file mode 100644 index 0000000000..9533c07eba --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/If/AbpIfTagHelper.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Razor.TagHelpers; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.If +{ + [HtmlTargetElement(Attributes = "abp-if")] + public class AbpIfTagHelper : AbpTagHelper + { + [HtmlAttributeName("abp-if")] + public bool Condition { get; set; } + + public override void Process(TagHelperContext context, TagHelperOutput output) + { + if (!Condition) + { + output.SuppressOutput(); + } + } + } +}