feat(player): 新增桌面端 UI 与响应式双端路由架构

- 将原移动端页面重命名为 Mobile*,新增 22 个 Desktop* 视图与 DesktopShell 布局体系
- 路由入口改为 Wrapper 视图,通过 useViewport(≥1024px)自动切换移动/桌面端
- 新增投注单面板、盘口弹层、联赛侧栏、数据表格等桌面组件及独立样式令牌
- 扩展 betSlip store、串关筛选、冠军盘、Toast/悬浮信箱等交互与三语 i18n
- 公告/消息 Hub 拆分移动与桌面实现;API 投注/钱包/充值记录支持 pageSize 分页
This commit is contained in:
2026-06-29 18:01:39 +08:00
parent 9c5e8d6f5c
commit 8a1ba0fd95
116 changed files with 22249 additions and 8693 deletions

View File

@@ -0,0 +1,39 @@
import { ref } from 'vue';
import type { SlipItem } from '../stores/betSlip';
const visible = ref(false);
const anchorX = ref(0);
const anchorY = ref(0);
const pendingItem = ref<SlipItem | null>(null);
export function useDesktopBetPopover() {
function openAt(event: MouseEvent, item: SlipItem) {
const pad = 12;
const popW = 300;
const popH = 320;
let x = event.clientX + pad;
let y = event.clientY + pad;
if (typeof window !== 'undefined') {
x = Math.min(x, window.innerWidth - popW - pad);
y = Math.min(y, window.innerHeight - popH - pad);
}
anchorX.value = Math.max(pad, x);
anchorY.value = Math.max(pad, y);
pendingItem.value = item;
visible.value = true;
}
function close() {
visible.value = false;
pendingItem.value = null;
}
return {
visible,
anchorX,
anchorY,
pendingItem,
openAt,
close,
};
}