Skip to content

Commit

Permalink
perf(UI组件模块): 调整Menu模块由共享模块到UI组件模块
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayisheji committed Nov 30, 2017
1 parent 31aa15c commit 40bd772
Show file tree
Hide file tree
Showing 14 changed files with 248 additions and 248 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './menu.module';
export * from './menu.module';
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
.menu-item {
line-height: 40px;
height: 40px;
list-style-type: disc;
list-style-position: inside;
border-right: 0;
margin-left: 0;
left: 0;
&:after {
content: "";
position: absolute;
right: 0;
top: 0;
bottom: 0;
border-right: 3px solid #1890ff;
transform: scaleY(0.0001);
opacity: 0;
transition: opacity 0.15s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.15s cubic-bezier(0.215, 0.61, 0.355, 1);
}
>a {
display: block;
color: rgba(0, 0, 0, 0.65);
&:before {
position: absolute;
background-color: transparent;
width: 100%;
height: 100%;
top: 0;
left: 0;
bottom: 0;
right: 0;
content: '';
}
&:after {
content: "";
display: block;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-image: radial-gradient(circle, #ffffff 10%, transparent 10.01%);
background-repeat: no-repeat;
background-size: 1000% 1000%;
background-position: 50%;
opacity: 0;
pointer-events: none;
transition: background .5s, opacity 1s;
}
&:active:after {
-webkit-background-size: 0% 0%;
background-size: 0% 0%;
opacity: .2;
transition: 0s;
}
}
.menu-item {
line-height: 40px;
height: 40px;
list-style-type: disc;
list-style-position: inside;
border-right: 0;
margin-left: 0;
left: 0;
&:after {
content: "";
position: absolute;
right: 0;
top: 0;
bottom: 0;
border-right: 3px solid #1890ff;
transform: scaleY(0.0001);
opacity: 0;
transition: opacity 0.15s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.15s cubic-bezier(0.215, 0.61, 0.355, 1);
}
>a {
display: block;
color: rgba(0, 0, 0, 0.65);
&:before {
position: absolute;
background-color: transparent;
width: 100%;
height: 100%;
top: 0;
left: 0;
bottom: 0;
right: 0;
content: '';
}
&:after {
content: "";
display: block;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-image: radial-gradient(circle, #ffffff 10%, transparent 10.01%);
background-repeat: no-repeat;
background-size: 1000% 1000%;
background-position: 50%;
opacity: 0;
pointer-events: none;
transition: background .5s, opacity 1s;
}
&:active:after {
-webkit-background-size: 0% 0%;
background-size: 0% 0%;
opacity: .2;
transition: 0s;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Inject, HostListener } from '@angular/core';

@Component({
// tslint:disable-next-line:component-selector
selector: '[app-menu-item]',
selector: '[sim-menu-item]',
templateUrl: './menu-item.component.html',
styleUrls: ['./menu-item.component.scss'],
encapsulation: ViewEncapsulation.None,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
.m-menu {
margin: 16px 0px;
width: 100%;
font-family: "Helvetica Neue For Number", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.5;
color: rgba(0, 0, 0, 0.65);
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
outline: none;
margin-bottom: 0;
padding-left: 0;
list-style: none;
z-index: 1050;
-webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
background: #fff;
-webkit-transition: background .3s, width .2s;
-o-transition: background .3s, width .2s;
transition: background .3s, width .2s;
zoom: 1;
&:before,
&:after {
content: " ";
display: table;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.menu-item,
.menu-submenu,
.menu-submenu-title {
cursor: pointer;
}
}

.menu-item,
.menu-submenu-title {
margin-top: 4px;
margin-bottom: 4px;
position: relative;
display: block;
white-space: nowrap;
transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
.menu-icon {
min-width: 14px;
margin-right: 8px;
transition: font-size 0.15s cubic-bezier(0.215, 0.61, 0.355, 1), margin 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
}

.menu-submenu .menu-sub {
cursor: initial;
transition: background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
.m-menu {
margin: 16px 0px;
width: 100%;
font-family: "Helvetica Neue For Number", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.5;
color: rgba(0, 0, 0, 0.65);
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
outline: none;
margin-bottom: 0;
padding-left: 0;
list-style: none;
z-index: 1050;
-webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
background: #fff;
-webkit-transition: background .3s, width .2s;
-o-transition: background .3s, width .2s;
transition: background .3s, width .2s;
zoom: 1;
&:before,
&:after {
content: " ";
display: table;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.menu-item,
.menu-submenu,
.menu-submenu-title {
cursor: pointer;
}
}

.menu-item,
.menu-submenu-title {
margin-top: 4px;
margin-bottom: 4px;
position: relative;
display: block;
white-space: nowrap;
transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
.menu-icon {
min-width: 14px;
margin-right: 8px;
transition: font-size 0.15s cubic-bezier(0.215, 0.61, 0.355, 1), margin 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
}

.menu-submenu .menu-sub {
cursor: initial;
transition: background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type menuMode = 'vertical' | 'horizontal' | 'inline';

@Component({
// tslint:disable-next-line:component-selector
selector: '[app-menu]',
selector: '[sim-menu]',
templateUrl: './menu.component.html',
styleUrls: ['./menu.component.scss'],
encapsulation: ViewEncapsulation.None,
Expand Down
File renamed without changes.

0 comments on commit 40bd772

Please sign in to comment.