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

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'],
})
主站蜘蛛池模板: 稻城县| 丹凤县| 双鸭山市| 嘉黎县| 紫金县| 平谷区| 定日县| 大连市| 屯门区| 五指山市| 双鸭山市| 惠州市| 岳普湖县| 咸宁市| 方城县| 沙雅县| 安泽县| 安达市| 孟津县| 浪卡子县| 龙井市| 眉山市| 河津市| 抚松县| 海伦市| 密山市| 唐海县| 平潭县| 鹿邑县| 察雅县| 会东县| 祁阳县| 正阳县| 忻州市| 堆龙德庆县| 松潘县| 定南县| 宁夏| 彩票| 梁山县| 广宗县|