fixed progress falling behind
This commit is contained in:
parent
ac495e06d9
commit
5c1126c105
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="questionmaire">
|
<div class="questionmaire">
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div v-bind:key="n" v-for="n in $store.state.questions.length - 1" v-bind:class="getDotClass(n)"></div>
|
<div v-bind:key="n" v-for="n in $store.state.questions.length" v-bind:class="getDotClass(n)"></div>
|
||||||
</div>
|
</div>
|
||||||
<Question
|
<Question
|
||||||
v-bind:type="$store.state.questions[$store.state.currentQuestion].type"
|
v-bind:type="$store.state.questions[$store.state.currentQuestion].type"
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDotClass(n) {
|
getDotClass(n) {
|
||||||
if (n < this.$store.state.currentQuestion) {
|
if (n <= this.$store.state.currentQuestion) {
|
||||||
return "point answered"
|
return "point answered"
|
||||||
} else {
|
} else {
|
||||||
return "point"
|
return "point"
|
||||||
|
|
Loading…
Reference in a new issue