1 Vue
.component("my-game-list", {
4 showVariant: function() {
5 return this.games
.length
> 0 && !!this.games
[0].vname
;
7 showResult: function() {
8 return this.games
.length
> 0 && this.games
[0].score
!= "*";
14 <th v-if="showVariant">Variant</th>
15 <th>Players names</th>
17 <th v-if="showResult">Result</th>
19 <tr v-for="g in games" @click="$emit('show-game',g)">
20 <td v-if="showVariant">{{ g.vname }}</td>
22 <span v-for="p in g.players">{{ p.name }}</span>
24 <td>{{ g.mainTime }} + {{ g.increment }}</td>
25 <td v-if="showResult">{{ g.score }}</td>