From dcc6e3588ebbaad6173f776bfce2ebd53967b69d Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Sun, 12 Apr 2026 01:13:26 +0800 Subject: [PATCH] fix(ui): disable token panel expand on mobile tap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移动端禁用点击展开顶部用量面板 - 仅允许在已展开时点击收起 --- static/src/app/methods/ui.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/src/app/methods/ui.ts b/static/src/app/methods/ui.ts index 8ff8d05..1cf5d14 100644 --- a/static/src/app/methods/ui.ts +++ b/static/src/app/methods/ui.ts @@ -628,7 +628,9 @@ export const uiMethods = { }, async changePermissionMode(mode) { - const target = String(mode || '').trim().toLowerCase(); + const target = String(mode || '') + .trim() + .toLowerCase(); if (!target || target === this.currentPermissionMode) { this.closePermissionMenu(); return; @@ -825,6 +827,10 @@ export const uiMethods = { if (this.isPolicyBlocked('block_token_panel', '用量统计已被管理员禁用')) { return; } + // 移动端禁用“点击展开顶部用量面板”,仅允许在已展开时点击收起 + if (this.isMobileViewport && this.tokenPanelCollapsed) { + return; + } this.toggleTokenPanel(); },