Commit | Line | Data |
---|---|---|
1 | new Vue({ | |
2 | el: "#variantPage", | |
3 | data: { | |
4 | display: "", //do not show anything... | |
5 | problem: undefined, //current problem in view | |
6 | }, | |
7 | methods: { | |
8 | toggleDisplay: function(elt) { | |
9 | if (this.display == elt) | |
10 | this.display = ""; //hide | |
11 | else | |
12 | this.display = elt; //show | |
13 | }, | |
14 | showProblem: function(problemTxt) { | |
15 | this.problem = JSON.parse(problemTxt); | |
16 | this.display = "game"; | |
17 | }, | |
18 | }, | |
19 | }); |