feat(game): 更新成都麻将游戏页面功能实现
- 移除静态背景图片导入,改为动态获取牌面图片 - 添加 MeldState 类型定义,支持副露状态管理 - 重构牌面图片获取逻辑,为不同座位创建独立配置文件 - 定义 TableTileImageType、WallTileItem 和 WallSeatState 接口 - 移除 selectedTile 响应式变量,优化手牌显示逻辑 - 创建 sortedVisibleHandTiles 计算属性替代原 visibleHandTiles - 添加 normalizeMeldType 和 normalizeMelds 函数处理副露数据标准化 - 在 PlayerState 中新增 handCount 和 hasHu 属性 - 更新房间玩家数据结构,同步处理手牌计数和胡牌状态 - 重构牌墙显示逻辑,实现动态渲染各座位手牌和副露 - 添加胡牌标识显示功能,改进牌面分组展示效果 - 优化 CSS 样式,调整牌墙布局和间距设置
This commit is contained in:
@@ -513,6 +513,11 @@
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.wall-live .wall-live-tile {
|
||||
display: block;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.wall-top,
|
||||
.wall-bottom {
|
||||
left: 50%;
|
||||
@@ -565,6 +570,83 @@
|
||||
bottom: 108px;
|
||||
}
|
||||
|
||||
.wall-top.wall-live .wall-live-tile,
|
||||
.wall-bottom.wall-live .wall-live-tile {
|
||||
width: 36px;
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
.wall-left.wall-live .wall-live-tile {
|
||||
width: 60px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.wall-right.wall-live .wall-live-tile {
|
||||
width: 60px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.wall-top.wall-live .wall-live-tile + .wall-live-tile,
|
||||
.wall-bottom.wall-live .wall-live-tile + .wall-live-tile {
|
||||
margin-left: -4px;
|
||||
}
|
||||
|
||||
.wall-left.wall-live .wall-live-tile + .wall-live-tile,
|
||||
.wall-right.wall-live .wall-live-tile + .wall-live-tile {
|
||||
margin-top: -22px;
|
||||
}
|
||||
|
||||
.wall-left.wall-live .wall-live-tile + .wall-live-tile{
|
||||
margin-top: -24px;
|
||||
}
|
||||
|
||||
.wall-live .wall-live-tile.is-group-start {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.wall-left.wall-live .wall-live-tile.is-group-start,
|
||||
.wall-right.wall-live .wall-live-tile.is-group-start {
|
||||
margin-left: 0;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.wall-bottom.wall-live {
|
||||
--wall-bottom-live-scale: 1;
|
||||
--wall-bottom-live-width: calc(60px * var(--wall-bottom-live-scale));
|
||||
--wall-bottom-live-height: calc(86px * var(--wall-bottom-live-scale));
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.wall-bottom.wall-live .wall-live-tile {
|
||||
width: var(--wall-bottom-live-width);
|
||||
height: var(--wall-bottom-live-height);
|
||||
filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
|
||||
}
|
||||
|
||||
.wall-bottom.wall-live .wall-live-tile + .wall-live-tile {
|
||||
margin-left: -4px;
|
||||
}
|
||||
|
||||
.wall-bottom.wall-live .wall-live-tile.is-group-start {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.wall-hu-flag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 8px;
|
||||
padding: 0 7px;
|
||||
border-radius: 999px;
|
||||
color: #fff3da;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
background: linear-gradient(180deg, rgba(219, 81, 56, 0.92), rgba(146, 32, 20, 0.96));
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
|
||||
}
|
||||
|
||||
/* 提高特异性,保证本页使用 room.css 配置值 */
|
||||
.picture-scene .wall-top {
|
||||
top: 120px;
|
||||
@@ -575,7 +657,7 @@
|
||||
}
|
||||
|
||||
.picture-scene .wall-bottom {
|
||||
bottom: 160px;
|
||||
bottom: 124px;
|
||||
}
|
||||
|
||||
.picture-scene .wall-left {
|
||||
|
||||
Reference in New Issue
Block a user