Browse Source
Merge pull request #10355 from abpframework/cotur/bs-5-update
Update DropdownAlign
pull/10374/head
maliming
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
9 additions and
9 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownMenuTagHelper.cs
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownMenuTagHelperService.cs
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/DropdownAlign.cs
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/Default.cshtml
-
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Dropdowns.cshtml
-
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
{ |
|
|
|
public class AbpDropdownMenuTagHelper : AbpTagHelper<AbpDropdownMenuTagHelper, AbpDropdownMenuTagHelperService> |
|
|
|
{ |
|
|
|
public DropdownAlign Align { get; set; } = DropdownAlign.Left; |
|
|
|
public DropdownAlign Align { get; set; } = DropdownAlign.Start; |
|
|
|
|
|
|
|
public AbpDropdownMenuTagHelper(AbpDropdownMenuTagHelperService tagHelperService) |
|
|
|
: base(tagHelperService) |
|
|
|
|
|
|
|
@ -18,10 +18,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown |
|
|
|
{ |
|
|
|
switch (TagHelper.Align) |
|
|
|
{ |
|
|
|
case DropdownAlign.Right: |
|
|
|
output.Attributes.AddClass("dropdown-menu-right"); |
|
|
|
case DropdownAlign.End: |
|
|
|
output.Attributes.AddClass("dropdown-menu-end"); |
|
|
|
return; |
|
|
|
case DropdownAlign.Left: |
|
|
|
case DropdownAlign.Start: |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
{ |
|
|
|
public enum DropdownAlign |
|
|
|
{ |
|
|
|
Left, |
|
|
|
Right |
|
|
|
Start, |
|
|
|
End |
|
|
|
} |
|
|
|
} |
|
|
|
@ -129,7 +129,7 @@ |
|
|
|
<abp-component-demo-section title="Menu alignment" view-path="@DropdownsDemoViewComponent.ViewPath"> |
|
|
|
<abp-dropdown> |
|
|
|
<abp-dropdown-button button-type="Secondary" text="Right-aligned" /> |
|
|
|
<abp-dropdown-menu align="Right"> |
|
|
|
<abp-dropdown-menu align="End"> |
|
|
|
<abp-dropdown-item href="#">Action</abp-dropdown-item> |
|
|
|
<abp-dropdown-item active="true" href="#">Active action</abp-dropdown-item> |
|
|
|
<abp-dropdown-item disabled="true" href="#">Disabled action</abp-dropdown-item> |
|
|
|
|
|
|
|
@ -563,7 +563,7 @@ |
|
|
|
<div class="demo-area"> |
|
|
|
<abp-dropdown> |
|
|
|
<abp-dropdown-button button-type="Secondary" text="Right-aligned" /> |
|
|
|
<abp-dropdown-menu align="Right"> |
|
|
|
<abp-dropdown-menu align="End"> |
|
|
|
<abp-dropdown-item href="#">Action</abp-dropdown-item> |
|
|
|
<abp-dropdown-item active="true" href="#">Active action</abp-dropdown-item> |
|
|
|
<abp-dropdown-item disabled="true" href="#">Disabled action</abp-dropdown-item> |
|
|
|
|
|
|
|
@ -37,7 +37,7 @@ |
|
|
|
{ |
|
|
|
<abp-dropdown> |
|
|
|
<abp-dropdown-button button-type="Primary" icon="plus" text="@L["CreateANewProject"].Value" /> |
|
|
|
<abp-dropdown-menu align="Right"> |
|
|
|
<abp-dropdown-menu align="End"> |
|
|
|
<abp-dropdown-item href="#" id="CreateNewGithubProjectButtonId"><i class="fa fa-github"></i> GitHub</abp-dropdown-item> |
|
|
|
</abp-dropdown-menu> |
|
|
|
</abp-dropdown> |
|
|
|
|