-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from kaola-fed/feature_sidebar_20170801
sidebar样式优化,增加iconClass和一级菜单url属性
- Loading branch information
Showing
6 changed files
with
50 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,8 @@ | |
top: 0; | ||
} | ||
} | ||
|
||
&:last-child { | ||
margin-bottom: 5px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,39 @@ | ||
{#if url} | ||
<a class="m-subMenu {class}" r-class={ {'active': active} } href="{url}"> | ||
<div class="head"> | ||
{#if iconClass} | ||
<span class="head_icon {iconClass}"></span> | ||
{/if} | ||
<span class="head_title"> | ||
{#if title} | ||
{title} | ||
{#elseif titleTemplate} | ||
{#inc titleTemplate} | ||
{/if} | ||
</span> | ||
</div> | ||
</a> | ||
{#else} | ||
<li class="m-subMenu {class}" r-class={ {'active': active} } on-click={this.toggle($event)}> | ||
<div class="head"> | ||
<span class="head_arrow u-icon u-icon-angle-down" r-class={ {'isOpen':active} }></span> | ||
{#if iconClass} | ||
<span class="head_icon {iconClass}"></span> | ||
{/if} | ||
<span class="head_title"> | ||
{#if title} | ||
{title} | ||
{#elseif titleTemplate} | ||
{#inc titleTemplate} | ||
{/if} | ||
</span> | ||
{#if this.$body} | ||
<span class="head_arrow u-icon u-icon-angle-right" r-class={ {'isOpen':active} }></span> | ||
{/if} | ||
</div> | ||
<ul class="menuItems" r-hide="!active" r-animation="on:enter;collapse:on;on:leave;collapse:off;"> | ||
{#if active} | ||
<ul class="menuItems" r-animation="on:enter;collapse:on;on:leave;collapse:off;"> | ||
{#inc this.$body} | ||
</ul> | ||
</li> | ||
{/if} | ||
</li> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters