feat(core): add header dropdown menu item separator divider line

This commit is contained in:
OldHawk
2017-06-24 00:16:14 +08:00
parent ec28e69d56
commit 03a0cd7d8f
2 changed files with 6 additions and 3 deletions

View File

@@ -196,9 +196,12 @@ body {
}
.menu-divider {
background-color: #fff;
border-top: solid 1px @dropdown-divider-bg;
padding-top: 11px !important;
margin-top: 9px;
a {
margin-top: 9px;
}
}
.vip-flag {

View File

@@ -13,8 +13,8 @@
<li ng-repeat="item in vm.menu.items | orderBy: 'position'" ng-if="item.shouldRender(vm.authentication.user);" ng-switch="item.type" ng-class="{ dropdown: item.type === 'dropdown' }" ui-sref-active="active" class="{{item.class}}" uib-dropdown="item.type === 'dropdown'">
<a ng-switch-when="dropdown" class="dropdown-toggle" uib-dropdown-toggle role="button"><span menu-title="{{item.title}}">{{::item.title}}</span>&nbsp;<span class="caret"></span></a>
<ul ng-switch-when="dropdown" class="dropdown-menu">
<li ui-sref-active="active" ng-repeat="subitem in item.items | orderBy: 'position'" ng-if="subitem.shouldRender(vm.authentication.user);">
<a ui-sref="{{subitem.state}}({{subitem.params}})" ng-bind="subitem.title" mt-target="{{subitem.target}}" menu-title="{{subitem.title}}" ng-class="{'menu-divider': subitem.divider}"></a>
<li ui-sref-active="active" ng-repeat="subitem in item.items | orderBy: 'position'" ng-if="subitem.shouldRender(vm.authentication.user);" ng-class="{'menu-divider': subitem.divider}">
<a ui-sref="{{subitem.state}}({{subitem.params}})" ng-bind="subitem.title" mt-target="{{subitem.target}}" menu-title="{{subitem.title}}"></a>
</li>
</ul>
<a ng-switch-default ui-sref="{{item.state}}" ng-bind="item.title" mt-target="{{item.target}}" menu-title="{{item.title}}"></a>