fix: 修复移动端仪表盘横向溢出
375px 视口下页面被撑到 763px:快速开始卡片的 curl 示例 <pre> 固有宽度沿 flex/grid 链层层撑破祖先(子项默认 min-width:auto 不可收缩,overflow-x-auto 形同虚设)。 - ShellLayout:flex-1 容器与 main 加 min-w-0 切断宽度传播(所有页面受益) - DashboardView:快速开始卡片各块加 min-w-0,pre 的边框/背景 移入 overflow-hidden 容器、自身横滚 Playwright 实测 375px 视口滚动宽度 763 → 375,与视口齐平
This commit is contained in:
@@ -116,7 +116,7 @@ async function logout() {
|
|||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<div class="flex min-h-[100dvh] flex-1 flex-col md:ml-56">
|
<div class="flex min-h-[100dvh] min-w-0 flex-1 flex-col md:ml-56">
|
||||||
<header class="flex h-14 items-center justify-between gap-2 border-b border-edge px-4 md:px-6">
|
<header class="flex h-14 items-center justify-between gap-2 border-b border-edge px-4 md:px-6">
|
||||||
<div class="flex min-w-0 items-center gap-2">
|
<div class="flex min-w-0 items-center gap-2">
|
||||||
<button
|
<button
|
||||||
@@ -142,7 +142,7 @@ async function logout() {
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="flex-1 px-4 py-6 md:px-6">
|
<main class="min-w-0 flex-1 px-4 py-6 md:px-6">
|
||||||
<router-view />
|
<router-view />
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -145,14 +145,14 @@ onMounted(load)
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 快速开始 -->
|
<!-- 快速开始 -->
|
||||||
<div class="card p-5">
|
<div class="card min-w-0 p-5">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<h2 class="text-sm font-semibold">快速开始</h2>
|
<h2 class="text-sm font-semibold">快速开始</h2>
|
||||||
<p class="text-xs text-muted">通过兼容端点接入,OpenAI / Anthropic 协议自动转换</p>
|
<p class="text-xs text-muted">通过兼容端点接入,OpenAI / Anthropic 协议自动转换</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
<div>
|
<div class="min-w-0">
|
||||||
<p class="mb-1.5 text-[11px] font-medium text-muted">Base URL</p>
|
<p class="mb-1.5 text-[11px] font-medium text-muted">Base URL</p>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<code class="min-w-0 flex-1 overflow-x-auto rounded-md border border-edge bg-surface px-3 py-2 font-mono text-xs whitespace-nowrap text-ink">{{ baseURL }}</code>
|
<code class="min-w-0 flex-1 overflow-x-auto rounded-md border border-edge bg-surface px-3 py-2 font-mono text-xs whitespace-nowrap text-ink">{{ baseURL }}</code>
|
||||||
@@ -162,7 +162,7 @@ onMounted(load)
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="min-w-0">
|
||||||
<p class="mb-1.5 text-[11px] font-medium text-muted">兼容</p>
|
<p class="mb-1.5 text-[11px] font-medium text-muted">兼容</p>
|
||||||
<div class="flex flex-wrap gap-1.5">
|
<div class="flex flex-wrap gap-1.5">
|
||||||
<Badge variant="neutral">messages</Badge>
|
<Badge variant="neutral">messages</Badge>
|
||||||
@@ -171,10 +171,10 @@ onMounted(load)
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="min-w-0">
|
||||||
<p class="mb-1.5 text-[11px] font-medium text-muted">curl 示例</p>
|
<p class="mb-1.5 text-[11px] font-medium text-muted">curl 示例</p>
|
||||||
<div class="relative">
|
<div class="min-w-0 overflow-hidden rounded-md border border-edge bg-surface">
|
||||||
<pre class="overflow-x-auto rounded-md border border-edge bg-surface px-3 py-2.5 pr-20 font-mono text-[11px] leading-relaxed text-ink">{{ curlCmd }}</pre>
|
<pre class="overflow-x-auto px-3 py-2.5 pr-20 font-mono text-[11px] leading-relaxed text-ink">{{ curlCmd }}</pre>
|
||||||
<Button size="sm" variant="ghost" class="absolute top-2 right-2" @click="copy(curlCmd, 'curl')">
|
<Button size="sm" variant="ghost" class="absolute top-2 right-2" @click="copy(curlCmd, 'curl')">
|
||||||
{{ copied === 'curl' ? '已复制' : '复制' }}
|
{{ copied === 'curl' ? '已复制' : '复制' }}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user