官术网_书友最值得收藏!

The 'player turn' overlay

The first overlay will display two different messages to the current player, depending on whether it is skipping their turn or not. The player prop will receive the current player so that we can access its data. We will use a v-if directive paired with a v-else directive and the skipTurn property we just added to the players:

      Vue.component('overlay-content-player-turn', {
template: `<p>
<p class="big" v-if="player.skipTurn">{{ player.name }}, <br>your turn is skipped!</p>
<p class="big" v-else>{{ player.name }},<br>your turn has come!</p>
<p>Tap to continue</p>
</p>`,
props: ['player'],
})
主站蜘蛛池模板: 嘉禾县| 织金县| 甘谷县| 彝良县| 孟州市| 社会| 六枝特区| 奉新县| 育儿| 葫芦岛市| 萨嘎县| 舒城县| 阳西县| 棋牌| 衡南县| 银川市| 兴义市| 泉州市| 瓮安县| 商南县| 大悟县| 百色市| 隆尧县| 招远市| 泊头市| 四会市| 桐乡市| 吉隆县| 剑阁县| 渭南市| 延庆县| 林口县| 平乐县| 富阳市| 安丘市| 调兵山市| 涞水县| 双牌县| 宿松县| 柯坪县| 建湖县|