[improvement] Steps: 优化样式 (#835)

This commit is contained in:
Fyerl 2018-10-31 19:57:37 +08:00 committed by rex
parent ce6314cb28
commit 47c12a45d2
2 changed files with 29 additions and 20 deletions

View File

@ -5,14 +5,21 @@
background-color: @white;
&--horizontal {
padding: 10px;
.van-step__wrapper {
position: relative;
display: flex;
overflow: hidden;
padding: 10px 10px 15px;
}
}
&--vertical {
padding: 0 0 0 35px;
padding-left: 10px;
.van-step__wrapper {
padding: 0 0 0 20px;
}
}
}
@ -49,7 +56,7 @@
&:last-child {
position: absolute;
right: 10px;
right: 0;
width: auto;
.van-step__title {

View File

@ -1,4 +1,5 @@
<view class="custom-class van-steps van-steps--{{ direction }}">
<view class="van-step__wrapper">
<view
wx:for="{{ steps }}"
wx:key="index"
@ -16,3 +17,4 @@
<view wx:if="{{ index !== steps.length - 1 }}" class="van-step__line" style="{{ item.status === 'finish' ? 'background-color: ' + activeColor : '' }}" />
</view>
</view>
</view>