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