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

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'],
})
主站蜘蛛池模板: 丰宁| 丹阳市| 滦平县| 大连市| 永平县| 桂阳县| 德惠市| 富顺县| 北川| 凌海市| 苍梧县| 图木舒克市| 南部县| 永平县| 综艺| 绍兴市| 渝中区| 碌曲县| 缙云县| 武陟县| 铜梁县| 通渭县| 锡林浩特市| 张家川| 陵川县| 邛崃市| 新密市| 沂水县| 鄄城县| 额济纳旗| 阳新县| 昆明市| 安乡县| 西丰县| 沁源县| 达孜县| 高淳县| 车致| 元朗区| 安溪县| 莱西市|