add Collapse component
add Collapse component
This commit is contained in:
parent
14768934b1
commit
49306c7a7f
12 changed files with 268 additions and 27 deletions
|
@ -5,4 +5,12 @@
|
|||
}
|
||||
.fade-enter, .fade-leave {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.height-transition{
|
||||
.transition(all @transition-time @ease-in-out);
|
||||
}
|
||||
|
||||
.height-enter, .height-leave {
|
||||
height: 0;
|
||||
}
|
51
styles/components/collapse.less
Normal file
51
styles/components/collapse.less
Normal file
|
@ -0,0 +1,51 @@
|
|||
@collapse-prefix-cls: ~"@{css-prefix}collapse";
|
||||
|
||||
.@{collapse-prefix-cls}{
|
||||
background-color: @background-color-base;
|
||||
border-radius: 3px;
|
||||
border: 1px solid @border-color-base;
|
||||
|
||||
& > &-item{
|
||||
border-top: 1px solid @border-color-base;
|
||||
&:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
> .@{collapse-prefix-cls}-header{
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
padding-left: 32px;
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
|
||||
> i{
|
||||
.transition(transform @transition-time @ease-in-out);
|
||||
}
|
||||
}
|
||||
}
|
||||
& > &-item&-item-active > &-header > i{
|
||||
.transform(rotate(90deg));
|
||||
}
|
||||
|
||||
&-content{
|
||||
//display: none;
|
||||
overflow: hidden;
|
||||
color: @text-color;
|
||||
padding: 0 16px;
|
||||
background-color: #fff;
|
||||
|
||||
& > &-box {
|
||||
padding-top: 16px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
}
|
||||
&-item-active > &-content{
|
||||
//display: block;
|
||||
}
|
||||
&-item:last-child {
|
||||
> .@{collapse-prefix-cls}-content {
|
||||
border-radius: 0 0 3px 3px;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,4 +4,5 @@
|
|||
@import "badge";
|
||||
@import "circle";
|
||||
@import "spin";
|
||||
@import "alert";
|
||||
@import "alert";
|
||||
@import "collapse";
|
|
@ -14,6 +14,11 @@
|
|||
// Base
|
||||
@body-background : #fff;
|
||||
|
||||
// Border color
|
||||
@border-color-base : #d9d9d9; // base
|
||||
// Background color
|
||||
@background-color-base : #f7f7f7; // base
|
||||
|
||||
@font-family : "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
|
||||
@code-family : Consolas,Menlo,Courier,monospace;
|
||||
@text-color : #525558;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue