From df6b3f2371b03a2f7650c6f4721a55961d68d20b Mon Sep 17 00:00:00 2001 From: wx <2636507191@qq.com> Date: Mon, 4 May 2026 15:31:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(blog):=20=E6=AD=A3=E6=96=87=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E5=B7=A5=E5=85=B7=E6=A0=8F=20sticky=20?= =?UTF-8?q?=E8=B7=9F=E9=9A=8F=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit position: sticky; top: 0; z-index: 10 工具栏吸附 viewport 顶部, 编辑长文滚动时格式按钮始终可见 sticky 范围限制在 .rich-editor 父容器内, 滚出编辑器自然消失 Co-Authored-By: Claude Opus 4.7 (1M context) --- components/admin/RichTextEditor.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/admin/RichTextEditor.vue b/components/admin/RichTextEditor.vue index a237a57..606f4ad 100644 --- a/components/admin/RichTextEditor.vue +++ b/components/admin/RichTextEditor.vue @@ -134,6 +134,9 @@ async function handleFileChange(e) { border-bottom: 1px solid #e5e7eb; background: #fafafa; border-radius: 4px 4px 0 0; + position: sticky; + top: 0; + z-index: 10; } .toolbar-btn {