diff --git a/src/App.vue b/src/App.vue index 6ca0cc6..4c62c26 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,8 @@ @@ -96,4 +98,11 @@ line-height: 1.35em; font-size: 24px; } + + .fade-enter-active, .fade-leave-active { + transition: opacity .5s; + } + .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ { + opacity: 0; + } diff --git a/src/components/Question.vue b/src/components/Question.vue index 5ca5fcd..f386d7f 100644 --- a/src/components/Question.vue +++ b/src/components/Question.vue @@ -13,9 +13,22 @@ diff --git a/src/views/Questionnaire.vue b/src/views/Questionnaire.vue index 29b76b6..feeea59 100644 --- a/src/views/Questionnaire.vue +++ b/src/views/Questionnaire.vue @@ -4,9 +4,9 @@
+ v-bind:type="$store.state.questions[$route.params.id].type" + v-bind:question="$store.state.questions[$route.params.id].question" + v-bind:answers="$store.state.questions[$route.params.id].answers"> @@ -17,7 +17,7 @@ components: {Question}, methods: { getDotClass(n) { - if (n <= this.$store.state.currentQuestion) { + if (n <= this.$route.params.id) { return "point answered" } else { return "point" diff --git a/src/views/Results.vue b/src/views/Results.vue index 19f3636..a5347aa 100644 --- a/src/views/Results.vue +++ b/src/views/Results.vue @@ -1,17 +1,20 @@