bin-ui
Version:
基于 vue2.6 / vue-cli3 的 UI 组件库
397 lines (371 loc) • 7.91 kB
text/stylus
$steps-wait-icon-color = #ccc;
$steps-wait-title-color = #999;
$steps-wait-description-color = #999;
$steps-wait-tail-color = #e8eaec;
$border-color-split = #e8eaec;
$steps-title-color = #666;
.bin-steps {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
font-size: 0;
line-height: 1.5;
&-item {
display: inline-block;
position: relative;
vertical-align: top;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
overflow: hidden;
&:last-child {
-webkit-box-flex: 0;
-ms-flex: 0;
flex: none;
}
&.bin-steps-status-wait {
.bin-steps-head-inner {
background-color: #fff;
> .bin-steps-icon, span {
color: $steps-wait-icon-color;
}
}
.bin-steps-title {
color: $steps-wait-title-color;
}
.bin-steps-content {
color: $steps-wait-description-color;
}
.bin-steps-tail > i {
background-color: $steps-wait-tail-color;
}
}
&.bin-steps-status-process {
.bin-steps-head-inner {
border-color: $color-primary;
background-color: $color-primary;
> .bin-steps-icon, span {
color: #fff;
}
}
.bin-steps-title {
color: $steps-title-color;
}
.bin-steps-content {
color: $steps-title-color;
}
.bin-steps-tail > i {
background-color: $border-color-split;
}
}
&.bin-steps-status-finish {
.bin-steps-head-inner {
background-color: #fff;
border-color: $color-primary;
> .bin-steps-icon, span {
color: $color-primary;
}
}
.bin-steps-tail > i:after {
width: 100%;
background: $color-primary;
transition: $animation-duration-base ease-in-out;
opacity: 1;
}
.bin-steps-title {
color: $steps-wait-title-color;
}
.bin-steps-content {
color: $steps-wait-description-color;
}
}
&.bin-steps-status-success {
.bin-steps-head-inner {
background-color: #fff;
border-color: $color-success;
> .bin-steps-icon {
color: $color-success;
}
span {
color: $color-success;
}
}
.bin-steps-title {
color: $color-success;
}
.bin-steps-content {
color: $color-success;
}
.bin-steps-tail > i {
background-color: $border-color-split;
}
}
&.bin-steps-next-success {
.bin-steps-tail > i,
.bin-steps-tail > i:after {
background-color: $color-success;
}
}
&.bin-steps-status-error {
.bin-steps-head-inner {
background-color: #fff;
border-color: $color-danger;
> .bin-steps-icon {
color: $color-danger;
}
}
.bin-steps-title {
color: $color-danger;
}
.bin-steps-content {
color: $color-danger;
}
.bin-steps-tail > i {
background-color: $border-color-split;
}
}
&.bin-steps-next-error {
.bin-steps-tail > i,
.bin-steps-tail > i:after {
background-color: $color-danger;
}
}
&.bin-steps-custom {
.bin-steps-head-inner {
background: none;
border: 0;
width: auto;
height: auto;
> .bin-steps-icon {
font-size: 20px;
top: 2px;
width: 20px;
height: 20px;
}
}
&.bin-steps-status-process {
.bin-steps-head-inner > .bin-steps-icon {
color: $color-primary;
}
}
}
}
&-item:last-child &-tail {
display: none;
}
.bin-steps-head,
.bin-steps-main {
position: relative;
display: inline-block;
vertical-align: top;
}
.bin-steps-head {
background: #fff;
}
.bin-steps-head-inner {
display: block;
width: 26px;
height: 26px;
line-height: 24px;
margin-right: 8px;
text-align: center;
border: 1px solid $steps-wait-icon-color;
border-radius: 50%;
font-size: 14px;
transition: background-color $animation-duration-base ease-in-out;
> .bin-steps-icon {
line-height: 1;
position: relative;
vertical-align: -1px;
&.iconfont {
font-size: 24px;
}
.icon-ios-checkmark-empty,
.icon-ios-close-empty {
font-weight: bold;
}
}
}
.bin-steps-main {
margin-top: 2.5px;
display: inline;
}
.bin-steps-custom .bin-steps-title {
margin-top: 2.5px;
}
.bin-steps-title {
display: inline-block;
margin-bottom: 4px;
padding-right: 10px;
font-size: 14px;
font-weight: bold;
color: #666;
background: #fff;
> a:first-child:last-child {
color: #666;
}
}
.bin-steps-item-last {
.bin-steps-title {
padding-right: 0;
width: 100%;
}
}
.bin-steps-content {
font-size: 12px;
color: #999;
}
.bin-steps-tail {
width: 100%;
padding: 0 10px;
position: absolute;
left: 0;
top: 13px;
> i {
display: inline-block;
width: 100%;
height: 1px;
vertical-align: top;
background: $border-color-split;
border-radius: 1px;
position: relative;
&:after {
content: '';
width: 0;
height: 100%;
background: $border-color-split;
opacity: 0;
position: absolute;
top: 0;
}
}
}
&.bin-steps-small {
.bin-steps-head-inner {
width: 18px;
height: 18px;
line-height: 16px;
margin-right: 10px;
text-align: center;
border-radius: 50%;
font-size: 12px;
> .bin-steps-icon.iconfont {
font-size: 16px;
top: 0;
}
}
.bin-steps-main {
margin-top: 0;
}
.bin-steps-title {
margin-bottom: 4px;
margin-top: 0;
color: #666;
font-size: 12px;
font-weight: bold;
}
.bin-steps-content {
font-size: 12px;
color: #999;
padding-left: 30px;
}
.bin-steps-tail {
top: 8px;
padding: 0 8px;
> i {
height: 1px;
width: 100%;
border-radius: 1px;
}
}
}
&.bin-steps-small .bin-steps-item.bin-steps-custom .bin-steps-head-inner,
.bin-steps-item.bin-steps-custom .bin-steps-head-inner {
width: inherit;
height: inherit;
line-height: inherit;
border-radius: 0;
border: 0;
background: none;
}
}
.bin-steps-vertical {
display: block;
.bin-steps-item {
display: block;
overflow: visible;
}
.bin-steps-tail {
position: absolute;
left: 13px;
top: 0;
height: 100%;
width: 1px;
padding: 30px 0 4px 0;
> i {
height: 100%;
width: 1px;
&:after {
height: 0;
width: 100%;
}
}
}
.bin-steps-status-finish {
.bin-steps-tail > i:after {
height: 100%;
}
}
.bin-steps-head {
float: left;
&-inner {
margin-right: 16px;
}
}
.bin-steps-main {
min-height: 47px;
overflow: hidden;
display: block;
.bin-steps-title {
line-height: 26px;
}
.bin-steps-content {
padding-bottom: 12px;
padding-left: 0;
}
}
.bin-steps-custom .bin-steps-icon {
left: 4px;
}
&.bin-steps-small .bin-steps-custom .bin-steps-icon {
left: 0;
}
}
.bin-steps-vertical.bin-steps-small {
.bin-steps-tail {
position: absolute;
left: 9px;
top: 0;
padding: 22px 0 4px 0;
> i {
height: 100%;
}
}
.bin-steps-title {
line-height: 18px;
}
}
.bin-steps-horizontal {
&.bin-steps-hidden {
visibility: hidden;
}
.bin-steps-content {
//max-width: 100px;
padding-left: 35px;
}
.bin-steps-item:not(:first-child) .bin-steps-head {
padding-left: 10px;
margin-left: -10px;
}
}