feat(player): 合并 main 桌面快算能力并完善 theme-2 球赛/首页体验

- 恢复桌面首页焦点大卡布局、悬停下注、VS 高亮与注单动画,移除焦点卡背景图
- 对齐主分支快算弹层上下定位与卡片 engaged 状态;详情页补充 cancelClose/高亮
- 球赛/优胜冠军页恢复 MatchBetCard、冠军卡悬停快算与 OutrightBetModal
- 首页 hotMatches 接口返回 markets,修复卡片切换玩法误显暂无盘口
- 补充 i18n:bet.all、no_market_odds、quick_bet、outright_view_all 等;移除 Tab 表情符号
This commit is contained in:
2026-07-03 11:44:09 +08:00
parent 9daf919d88
commit 3908e5539d
15 changed files with 2231 additions and 722 deletions

View File

@@ -1,7 +1,9 @@
<script setup lang="ts">
<script setup lang="ts">
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { resolveSelectionLabel } from '../../utils/selectionLabel';
import { useDesktopBetPopover } from '../../composables/useDesktopBetPopover';
const props = defineProps<{
selections: {
@@ -13,9 +15,9 @@ const props = defineProps<{
}[];
isSelected: (id: string) => boolean;
compact?: boolean;
/** PC 行内横排:左标签右赔率,适合详情页全宽行 */
/** PC 琛屽唴妯帓锛氬乏鏍囩鍙宠禂鐜囷紝閫傚悎璇︽儏椤靛叏瀹借 */
horizontal?: boolean;
/** PC 卡片内:上标签下赔率,列数随选项数量 */
/** PC 鍗$墖鍐咃細涓婃爣绛句笅璧旂巼锛屽垪鏁伴殢閫夐」鏁伴噺 */
desktopCard?: boolean;
locked?: boolean;
lineValue?: string | number | null;
@@ -23,6 +25,7 @@ const props = defineProps<{
const emit = defineEmits<{ pick: [id: string, event?: MouseEvent] }>();
const { t } = useI18n();
const { cancelClose } = useDesktopBetPopover();
function label(sel: (typeof props.selections)[number]) {
if (sel.selectionDisplayName?.trim()) return sel.selectionDisplayName;
@@ -53,7 +56,7 @@ const panelStyle = computed(() =>
</script>
<template>
<div class="wrap" :class="{ compact, horizontal, desktopCard, locked }">
<div class="wrap" :class="{ compact, horizontal, desktopCard, locked }" @mouseenter="cancelClose">
<div
class="panel"
:class="{ horizontal, 'desktop-card': desktopCard }"
@@ -67,6 +70,7 @@ const panelStyle = computed(() =>
:class="{ selected: isSelected(sel.id), 'odds-btn--locked': locked }"
:data-bet-selection-id="sel.id"
:disabled="locked"
@mouseenter="onPick(sel.id, $event)"
@click="onPick(sel.id, $event)"
>
<span class="label">{{ label(sel) }}</span>
@@ -147,14 +151,14 @@ const panelStyle = computed(() =>
}
.panel.desktop-card .odds-btn {
min-height: 38px;
padding: 4px 6px;
gap: 2px;
min-height: 34px;
padding: 3px 4px;
gap: 1px;
}
.panel.desktop-card .odds-btn .label {
font-size: 9px;
line-height: 1.2;
font-size: 8px;
line-height: 1.15;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
@@ -162,7 +166,7 @@ const panelStyle = computed(() =>
}
.panel.desktop-card .odds-btn .odds {
font-size: 13px;
font-size: 12px;
line-height: 1.1;
}