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

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'],
})
主站蜘蛛池模板: 黄骅市| 芦山县| 安多县| 平度市| 麻阳| 延川县| 赤水市| 西充县| 荆门市| 嘉鱼县| 西吉县| 出国| 名山县| 青海省| 佛山市| 正蓝旗| 河池市| 武定县| 石景山区| 临漳县| 遂溪县| 汨罗市| 鄂伦春自治旗| 许昌县| 邓州市| 都江堰市| 库尔勒市| 大姚县| 龙州县| 濮阳县| 富锦市| 潞城市| 满城县| 梁河县| 伊吾县| 洪雅县| 上饶县| 颍上县| 南乐县| 河曲县| 明光市|