From 68df772ba57ed0761864aa4f481e595fafa06629 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 23 Jun 2026 14:08:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E5=85=A8=E7=AB=99=E6=96=87?= =?UTF-8?q?=E5=AD=97=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=8F=AF=E9=80=89=EF=BC=88?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E7=AD=89=E5=8F=AF=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=8C=BA=E4=BE=8B=E5=A4=96=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit body 设 user-select:none,避免拖选问候语/时间/导航等装饰文字; input/textarea/contenteditable 及 [data-selectable] 仍可正常选中复制。 Co-Authored-By: Claude Opus 4.8 --- Client/src/index.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Client/src/index.css b/Client/src/index.css index 403d050..a60be76 100644 --- a/Client/src/index.css +++ b/Client/src/index.css @@ -46,6 +46,19 @@ body { } } +/* 全站文字默认不可选;输入框/文本域/可编辑区例外,加 data-selectable 可单独放开 */ +body { + -webkit-user-select: none; + user-select: none; +} +input, +textarea, +[contenteditable='true'], +[data-selectable] { + -webkit-user-select: text; + user-select: text; +} + /* 选中文本配色 */ ::selection { background: var(--color-accent);