Update questions data using computed

When I click another language option in quiz component,
the quiz sentence is not changed to another language.
So I refactor questions 'data' to 'computed'
pull/141/head
DaehunGwak 4 years ago
parent 79f64f4cba
commit 764ce644fa

@ -28,15 +28,20 @@
import messages from "@/assets/translations";
export default {
name: "Quiz",
data() {
return {
currentQuestion: 0,
complete: false,
error: false,
route: "",
questions: this.$t("quizzes"),
};
},
computed: {
questions() {
return this.$t("quizzes");
}
},
i18n: { messages },
methods: {

Loading…
Cancel
Save