merge: 修复平板竖屏设置弹窗页签溢出

This commit is contained in:
margrop
2026-12-04 19:01:24 +08:00
2 changed files with 3 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ test('平板竖屏顶部 7 个导航入口、设置页签与筛选行均可达
await expect(dialog).toBeVisible();
const tabsList = dialog.getByRole('tablist');
await expect(tabsList).toBeVisible();
expect(await dialog.evaluate((element) => element.scrollWidth <= element.clientWidth)).toBe(true);
expect(await tabsList.evaluate((element) => element.scrollWidth <= element.clientWidth)).toBe(true);
const tabs = dialog.getByRole('tab');
await expect(tabs).toHaveCount(8);

View File

@@ -141,8 +141,8 @@ export function SettingsDialog() {
</DialogDescription>
</DialogHeader>
<Tabs defaultValue="general" className="w-full">
<TabsList className="sticky top-0 z-10 flex h-auto w-full max-w-full justify-start gap-1 overflow-x-auto bg-card py-1 lg:justify-center">
<Tabs defaultValue="general" className="w-full min-w-0">
<TabsList className="sticky top-0 z-10 flex h-auto w-full max-w-full justify-start gap-1 overflow-x-auto bg-card py-1 sm:flex-wrap sm:overflow-visible lg:justify-center">
<SettingsTab value="general" icon={<Languages className="h-4 w-4" />} label={t.settings?.tabs?.general || "General"} />
<SettingsTab value="account" icon={<User className="h-4 w-4" />} label={t.settings?.tabs?.account || "Account"} />
<SettingsTab value="data" icon={<DatabaseBackup className="h-4 w-4" />} label={t.settings?.tabs?.data || "Data & Backup"} />