Commit 2cd3ef4b authored by wacky6.AriesMBP's avatar wacky6.AriesMBP Committed by 杨奕

Steps: fix progress line for error step

parent c928314a
...@@ -80,6 +80,10 @@ export default { ...@@ -80,6 +80,10 @@ export default {
currentStatus() { currentStatus() {
return this.status || this.internalStatus; return this.status || this.internalStatus;
}, },
prevStatus() {
const prevStep = this.$parent.steps[this.index - 1];
return prevStep ? prevStep.currentStatus : 'wait';
},
isLast: function() { isLast: function() {
const parent = this.$parent; const parent = this.$parent;
return parent.steps[parent.steps.length - 1] === this; return parent.steps[parent.steps.length - 1] === this;
...@@ -114,7 +118,7 @@ export default { ...@@ -114,7 +118,7 @@ export default {
if (val > this.index) { if (val > this.index) {
this.internalStatus = this.$parent.finishStatus; this.internalStatus = this.$parent.finishStatus;
} else if (val === this.index) { } else if (val === this.index && this.prevStatus !== 'error') {
this.internalStatus = this.$parent.processStatus; this.internalStatus = this.$parent.processStatus;
} else { } else {
this.internalStatus = 'wait'; this.internalStatus = 'wait';
...@@ -129,7 +133,7 @@ export default { ...@@ -129,7 +133,7 @@ export default {
style.transitionDelay = 150 * this.index + 'ms'; style.transitionDelay = 150 * this.index + 'ms';
if (status === this.$parent.processStatus) { if (status === this.$parent.processStatus) {
step = 50; step = this.currentStatus !== 'error' ? 50 : 0;
} else if (status === 'wait') { } else if (status === 'wait') {
step = 0; step = 0;
style.transitionDelay = (-150 * this.index) + 'ms'; style.transitionDelay = (-150 * this.index) + 'ms';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment