fix(player): 优化桌面快速下注 hover 并修复充值 API 重复方法
删除 deposit.service 中重复的 getPlayerDepositOrder,避免 API 编译失败引发 500;快速下注弹层按卡片实例激活,同场赛事不再多处联动,移入快速下注区域时保持 VS 动画;记录列表改为整行可点,编号统一中性色样式。
This commit is contained in:
@@ -5,6 +5,7 @@ const visible = ref(false);
|
||||
const anchorX = ref(0);
|
||||
const anchorY = ref(0);
|
||||
const pendingItem = ref<SlipItem | null>(null);
|
||||
const activeCardRootId = ref<string | null>(null);
|
||||
const placement = ref<'top' | 'bottom'>('bottom');
|
||||
let closeTimer: number | undefined = undefined;
|
||||
|
||||
@@ -45,12 +46,15 @@ export function useDesktopBetPopover() {
|
||||
anchorX.value = x;
|
||||
anchorY.value = y;
|
||||
pendingItem.value = item;
|
||||
const root = el?.closest?.('[data-bet-card-root]') as HTMLElement | null;
|
||||
activeCardRootId.value = root?.dataset.betCardRoot ?? null;
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
function close() {
|
||||
visible.value = false;
|
||||
pendingItem.value = null;
|
||||
activeCardRootId.value = null;
|
||||
if (closeTimer !== undefined) {
|
||||
window.clearTimeout(closeTimer);
|
||||
closeTimer = undefined;
|
||||
@@ -64,6 +68,7 @@ export function useDesktopBetPopover() {
|
||||
closeTimer = window.setTimeout(() => {
|
||||
visible.value = false;
|
||||
pendingItem.value = null;
|
||||
activeCardRootId.value = null;
|
||||
closeTimer = undefined;
|
||||
}, delay);
|
||||
}
|
||||
@@ -75,15 +80,22 @@ export function useDesktopBetPopover() {
|
||||
}
|
||||
}
|
||||
|
||||
function isActiveForCard(cardRootId: string | null | undefined) {
|
||||
if (!cardRootId || !visible.value || !pendingItem.value) return false;
|
||||
return activeCardRootId.value === cardRootId;
|
||||
}
|
||||
|
||||
return {
|
||||
visible,
|
||||
anchorX,
|
||||
anchorY,
|
||||
pendingItem,
|
||||
activeCardRootId,
|
||||
placement,
|
||||
openAt,
|
||||
close,
|
||||
scheduleClose,
|
||||
cancelClose,
|
||||
isActiveForCard,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user