mirror of https://github.com/abpframework/abp.git
3 changed files with 52 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
[HtmlTargetElement("th")] |
|||
public class AbpTableHeadScopeTagHelper : AbpTagHelper<AbpTableHeadScopeTagHelper, AbpTableHeadScopeTagHelperService> |
|||
{ |
|||
public AbpThScope Scope { get; set; } = AbpThScope.Default; |
|||
|
|||
public AbpTableHeadScopeTagHelper(AbpTableHeadScopeTagHelperService tagHelperService) |
|||
: base(tagHelperService) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public class AbpTableHeadScopeTagHelperService : AbpTagHelperService<AbpTableHeadScopeTagHelper> |
|||
{ |
|||
public override void Process(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
SetScope(context, output); |
|||
} |
|||
|
|||
protected virtual void SetScope(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
switch (TagHelper.Scpoe) |
|||
{ |
|||
case AbpThScope.Default: |
|||
return; |
|||
case AbpThScope.Row: |
|||
output.Attributes.Add("scope", "row"); |
|||
return; |
|||
case AbpThScope.Column: |
|||
output.Attributes.Add("scope","col"); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public enum AbpThScope |
|||
{ |
|||
Default, |
|||
Row, |
|||
Column |
|||
} |
|||
} |
|||
Loading…
Reference in new issue