2
0
mirror of https://github.com/tenrok/vue-form-wizard.git synced 2026-06-08 13:42:24 +03:00

Progress percentage calculation fix

This commit is contained in:
cristi
2017-04-18 01:09:41 +03:00
parent 1fc30dde2b
commit cf2184063d
+3 -2
View File
@@ -180,8 +180,9 @@
progress () {
let percentage = 0
if (this.activeTabIndex > 0) {
let stepsToAdd = (this.activeTabIndex % 2 === 0) ? 3 : 2
percentage = this.stepPercentage * (this.activeTabIndex + stepsToAdd)
let stepsToAdd = 1
let stepMultiplier = 2
percentage = this.stepPercentage * ((this.activeTabIndex * stepMultiplier) + stepsToAdd)
} else {
percentage = this.stepPercentage
}