```
style(global): update background gradients and visual styling - Replace radial gradient with combined radial and linear gradients - Update color schemes with warmer tones and improved transparency - Adjust border colors and add subtle glow effects - Increase blur intensity for better glassmorphism effect style(game): enhance seat player card design - Add avatar panel container for better layout structure - Implement dealer mark positioning with absolute placement - Add missing suit icons with computed property mapping - Replace text-based missing marks with image icons when available - Improve visual hierarchy and spacing between elements refactor(game): add computed property for dynamic suit icon selection - Import suit icon assets (wan, tong, tiao) - Create computed property to map suit labels to corresponding icons - Handle fallback to text display when no icon is available ```
This commit is contained in:
@@ -1,10 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import wanIcon from '../../assets/images/flowerClolor/wan.png'
|
||||
import tongIcon from '../../assets/images/flowerClolor/tong.png'
|
||||
import tiaoIcon from '../../assets/images/flowerClolor/tiao.png'
|
||||
import type { SeatPlayerCardModel } from './seat-player-card'
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
seatClass: string
|
||||
player: SeatPlayerCardModel
|
||||
}>()
|
||||
|
||||
const missingSuitIcon = computed(() => {
|
||||
if (props.player.missingSuitLabel === '万') {
|
||||
return wanIcon
|
||||
}
|
||||
if (props.player.missingSuitLabel === '筒') {
|
||||
return tongIcon
|
||||
}
|
||||
if (props.player.missingSuitLabel === '条') {
|
||||
return tiaoIcon
|
||||
}
|
||||
return ''
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -12,12 +29,19 @@ defineProps<{
|
||||
class="player-badge"
|
||||
:class="[seatClass, { 'is-turn': player.isTurn, offline: !player.isOnline }]"
|
||||
>
|
||||
<div class="avatar-card">{{ player.avatar }}</div>
|
||||
<div class="avatar-panel">
|
||||
<div class="avatar-card">{{ player.avatar }}</div>
|
||||
<span v-if="player.dealer" class="dealer-mark">庄</span>
|
||||
</div>
|
||||
|
||||
<div class="player-meta">
|
||||
<p>{{ player.name }}</p>
|
||||
<strong>{{ player.money }}</strong>
|
||||
</div>
|
||||
<span v-if="player.dealer" class="dealer-mark">庄</span>
|
||||
<span class="missing-mark">{{ player.missingSuitLabel }}</span>
|
||||
|
||||
<div class="missing-mark">
|
||||
<img v-if="missingSuitIcon" :src="missingSuitIcon" alt="" />
|
||||
<span v-else>{{ player.missingSuitLabel }}</span>
|
||||
</div>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user