Update to use answers from VueX and not the data object.
This commit is contained in:
parent
5c55f73f85
commit
81d810e951
1 changed files with 4 additions and 5 deletions
|
|
@ -105,10 +105,6 @@ export default {
|
|||
},
|
||||
data() {return {
|
||||
visible: false,
|
||||
answers: {
|
||||
team_1: [ ``, ``, ``, ``, ``, ``, ``, `` ],
|
||||
team_2: [ ``, ``, ``, ``, ``, ``, ``, `` ],
|
||||
},
|
||||
}},
|
||||
computed: {
|
||||
teamID() {
|
||||
|
|
@ -117,6 +113,9 @@ export default {
|
|||
otherTeamID() {
|
||||
return this.$store.getters.otherTeamName.replace(/\s/g, `-`).toLowerCase();
|
||||
},
|
||||
answers() {
|
||||
return this.$store.state.answer;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
answerInputHandler(answerIndex) {
|
||||
|
|
@ -147,7 +146,7 @@ export default {
|
|||
* value: string
|
||||
* }
|
||||
*/
|
||||
this.answers[`team_${data.team}`].splice(data.answer - 1, 1, data.value);
|
||||
this.$store.commit(`UpdateAnswer`, data);
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue