fix(ui): disable token panel expand on mobile tap

- 移动端禁用点击展开顶部用量面板
- 仅允许在已展开时点击收起
This commit is contained in:
JOJO 2026-04-12 01:13:26 +08:00
parent bd891029df
commit dcc6e3588e

View File

@ -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();
},