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

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'],
})
主站蜘蛛池模板: 武鸣县| 格尔木市| 张北县| 沾益县| 且末县| 手机| 广灵县| 苗栗县| 文化| 嘉义县| 姜堰市| 荥经县| 南华县| 香格里拉县| 林周县| 八宿县| 盈江县| 鄂伦春自治旗| 浙江省| 北流市| 壶关县| 舞阳县| 白玉县| 大石桥市| 钟山县| 绥芬河市| 西宁市| 木兰县| 贵州省| 临沭县| 临洮县| 扎鲁特旗| 诸城市| 项城市| 南充市| 尼勒克县| 灵寿县| 阳曲县| 望奎县| 巴林左旗| 沙河市|