|
|
|
@ -4,11 +4,11 @@ |
|
|
|
|
<slot name="icon"></slot> |
|
|
|
|
</view> |
|
|
|
|
<view class="evan-step__icon-wrapper" :class="'evan-step__icon-wrapper--'+direction" v-else-if="icon"> |
|
|
|
|
<uni-icons :type="icon" size="22" :color="customIconColor" class="evan-step__custom-icon" :class="'evan-step__custom-icon--'+direction"></uni-icons> |
|
|
|
|
<uni-icons :type="icon" size="22" :color="'#fff'" class="evan-step__custom-icon" :class="'evan-step__custom-icon--'+direction"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
<view v-else class="evan-step__circle" :class="['evan-step__circle--'+direction,'evan-step__circle--'+currentStatus]" |
|
|
|
|
:style="{borderColor:circleStyle.borderColor,backgroundColor:circleStyle.backgroundColor}"> |
|
|
|
|
<uni-icons v-if="currentStatus==='finish'" type="checkmarkempty" :color="primaryColor" :size="circleIconSize"></uni-icons> |
|
|
|
|
<uni-icons v-if="currentStatus==='finish'" type="checkmarkempty" :color="'rgba(255,255,255,.5)'" :size="circleIconSize"></uni-icons> |
|
|
|
|
<uni-icons v-else-if="currentStatus==='error'" type="closeempty" color="#fff" :size="circleIconSize"></uni-icons> |
|
|
|
|
<text class="evan-step__circle__text" :class="'evan-step__circle__text--'+currentStatus" :style="{color:circleStyle.color}" |
|
|
|
|
v-else>{{index+1}}</text> |
|
|
|
@ -111,21 +111,21 @@ |
|
|
|
|
switch (this.currentStatus) { |
|
|
|
|
case 'finish': |
|
|
|
|
return { |
|
|
|
|
backgroundColor: '#fff', |
|
|
|
|
borderColor: this.primaryColor, |
|
|
|
|
backgroundColor: 'rgba(255,255,255,.1)', |
|
|
|
|
borderColor: 'rgba(255,255,255,.1)', |
|
|
|
|
color: this.primaryColor |
|
|
|
|
} |
|
|
|
|
case 'process': |
|
|
|
|
return { |
|
|
|
|
backgroundColor: this.primaryColor, |
|
|
|
|
borderColor: this.primaryColor, |
|
|
|
|
backgroundColor: 'rgba(255,255,255,.3)', |
|
|
|
|
borderColor: 'rgba(255,255,255,1)', |
|
|
|
|
color: '#fff' |
|
|
|
|
} |
|
|
|
|
case 'wait': |
|
|
|
|
return { |
|
|
|
|
backgroundColor: '#ccc', |
|
|
|
|
borderColor: '#ccc', |
|
|
|
|
color: '#fff' |
|
|
|
|
backgroundColor: 'rgba(255,255,255,.1)', |
|
|
|
|
borderColor: 'rgba(255,255,255,.1)', |
|
|
|
|
color: 'rgba(255,255,255,.5)' |
|
|
|
|
} |
|
|
|
|
case 'error': |
|
|
|
|
return { |
|
|
|
@ -135,66 +135,66 @@ |
|
|
|
|
} |
|
|
|
|
default: |
|
|
|
|
return { |
|
|
|
|
backgroundColor: '#fff', |
|
|
|
|
borderColor: this.primaryColor, |
|
|
|
|
color: this.primaryColor |
|
|
|
|
backgroundColor: 'rgba(255,255,255,.1)', |
|
|
|
|
borderColor: 'rgba(255,255,255,.1)', |
|
|
|
|
color: '#fff' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
titleColor() { |
|
|
|
|
switch (this.currentStatus) { |
|
|
|
|
case 'finish': |
|
|
|
|
return 'rgba(0,0,0,0.65)' |
|
|
|
|
return 'rgba(255,255,255,0.65)' |
|
|
|
|
case 'process': |
|
|
|
|
return 'rgba(0,0,0,0.85)' |
|
|
|
|
return 'rgba(255,255,255,0.85)' |
|
|
|
|
case 'wait': |
|
|
|
|
return 'rgba(0,0,0,0.45)' |
|
|
|
|
return 'rgba(255,255,255,0.45)' |
|
|
|
|
case 'error': |
|
|
|
|
return this.errorColor |
|
|
|
|
default: |
|
|
|
|
return 'rgba(0,0,0,0.85)' |
|
|
|
|
return 'rgba(255,255,255,0.85)' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
descriptionColor() { |
|
|
|
|
switch (this.currentStatus) { |
|
|
|
|
case 'finish': |
|
|
|
|
return 'rgba(0,0,0,0.45)' |
|
|
|
|
return 'rgba(255,255,255,0.45)' |
|
|
|
|
case 'process': |
|
|
|
|
return 'rgba(0,0,0,0.65)' |
|
|
|
|
return 'rgba(255,255,255,0.65)' |
|
|
|
|
case 'wait': |
|
|
|
|
return 'rgba(0,0,0,0.45)' |
|
|
|
|
return 'rgba(255,255,255,0.45)' |
|
|
|
|
case 'error': |
|
|
|
|
return this.errorColor |
|
|
|
|
default: |
|
|
|
|
return 'rgba(0,0,0,0.85)' |
|
|
|
|
return 'rgba(255,255,255,0.85)' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
customIconColor() { |
|
|
|
|
switch (this.currentStatus) { |
|
|
|
|
case 'finish': |
|
|
|
|
return this.primaryColor |
|
|
|
|
return 'rgba(255,255,255,0.85)' |
|
|
|
|
case 'process': |
|
|
|
|
return this.primaryColor |
|
|
|
|
return 'rgba(255,255,255,0.85)' |
|
|
|
|
case 'wait': |
|
|
|
|
return '#ccc' |
|
|
|
|
case 'error': |
|
|
|
|
return this.errorColor |
|
|
|
|
default: |
|
|
|
|
return this.primaryColor |
|
|
|
|
return 'rgba(255,255,255,0.85)' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
lineColor() { |
|
|
|
|
switch (this.nextStatus) { |
|
|
|
|
case 'finish': |
|
|
|
|
return this.primaryColor |
|
|
|
|
return 'rgba(255,255,255,0.3)' |
|
|
|
|
case 'process': |
|
|
|
|
return this.primaryColor |
|
|
|
|
return 'rgba(255,255,255,0.3)' |
|
|
|
|
case 'wait': |
|
|
|
|
return '#ddd' |
|
|
|
|
return 'rgba(255,255,255,0.3)' |
|
|
|
|
case 'error': |
|
|
|
|
return this.errorColor |
|
|
|
|
default: |
|
|
|
|
return this.primaryColor |
|
|
|
|
return 'rgba(255,255,255,0.3)' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
contentHeight() { |
|
|
|
@ -464,4 +464,7 @@ |
|
|
|
|
.evan-step__content__description--horizontal { |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
.step-items:first-child { |
|
|
|
|
margin-left: 400rpx; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|