fix: curl 示例复制按钮逃逸到页头叠加在退出按钮上

上轮移动端修复误删容器 relative,absolute 按钮向上冒泡定位到
页面顶端。加回 relative 使按钮回到代码块右上角。
This commit is contained in:
Sakurasan
2026-08-28 21:22:40 +08:00
parent faf38e2fd3
commit 3a836bf0e9
+1 -1
View File
@@ -173,7 +173,7 @@ onMounted(load)
<div class="min-w-0"> <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="min-w-0 overflow-hidden rounded-md border border-edge bg-surface"> <div class="relative min-w-0 overflow-hidden rounded-md border border-edge bg-surface">
<pre class="overflow-x-auto 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' ? '已复制' : '复制' }}