feat(game): 添加成都麻将打牌功能和E2E测试
- 添加discardPending状态控制丢弃牌操作 - 实现canDiscardTiles计算属性判断是否可以丢弃牌 - 新增handleRoomStateResponse函数处理房间状态响应 - 实现discardTile函数发送丢弃牌消息 - 在游戏页面添加手牌操作栏显示可丢弃的牌 - 为定缺按钮和准备按钮添加data-testid标识 - 在大厅页面为房间操作元素添加data-testid标识 - 添加手牌操作相关的CSS样式 - 配置Playwright E2E测试框架 - 创建房间流程到打牌的完整E2E测试用例
This commit is contained in:
@@ -917,6 +917,43 @@
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.hand-action-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
max-width: min(760px, calc(100vw - 120px));
|
||||
margin: 0 auto;
|
||||
padding: 10px 14px;
|
||||
border-radius: 18px;
|
||||
background: rgba(14, 25, 22, 0.72);
|
||||
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
|
||||
}
|
||||
|
||||
.hand-action-tile {
|
||||
min-width: 58px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(180deg, rgba(244, 228, 194, 0.98), rgba(214, 190, 145, 0.96));
|
||||
color: #2e1e14;
|
||||
font-size: 15px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.04em;
|
||||
box-shadow:
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.4),
|
||||
0 6px 14px rgba(0, 0, 0, 0.18);
|
||||
transition: transform 120ms ease-out, box-shadow 120ms ease-out, opacity 120ms ease-out;
|
||||
}
|
||||
|
||||
.hand-action-tile:active:not(:disabled) {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
.hand-action-tile:disabled {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.ding-que-bar {
|
||||
position: absolute;
|
||||
right: 150px;
|
||||
|
||||
Reference in New Issue
Block a user