From 8e92c5ae3e5f65c602201e16e465a1e5f3fa8d71 Mon Sep 17 00:00:00 2001 From: smail Date: Fri, 16 Oct 2026 08:00:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=85=A8=E7=A0=81?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A1=8C=E9=9D=A2=E7=AB=AF=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SecuritySettings/SecuritySettings.css | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/frontend/src/views/components/SecuritySettings/SecuritySettings.css b/frontend/src/views/components/SecuritySettings/SecuritySettings.css index b63e391b..28c3e661 100644 --- a/frontend/src/views/components/SecuritySettings/SecuritySettings.css +++ b/frontend/src/views/components/SecuritySettings/SecuritySettings.css @@ -725,3 +725,127 @@ overflow-x: auto !important; } } + +/* 桌面端按浏览器窗口布局,避免设置抽屉宽度误触发移动端容器规则。 */ +@media (min-width: 768px) { + .security-settings-card .security-key-header { + display: grid !important; + grid-template-columns: minmax(0, 1fr) max-content !important; + grid-template-rows: auto auto !important; + grid-template-areas: + "title actions" + "description description"; + align-items: center !important; + column-gap: 16px !important; + row-gap: 8px !important; + } + + .security-settings-card .security-key-header > :first-child { + display: contents !important; + } + + .security-settings-card .security-key-header > :first-child > h3 { + grid-area: title !important; + align-self: center !important; + margin: 0 !important; + line-height: 1.4 !important; + white-space: nowrap !important; + } + + .security-settings-card .security-key-header > :first-child > .settings-desc { + grid-area: description !important; + min-width: 0 !important; + margin: 0 !important; + line-height: 1.5 !important; + white-space: normal !important; + overflow-wrap: anywhere; + } + + .security-settings-card .security-key-header > .security-recovery-actions { + display: flex !important; + grid-area: actions !important; + flex: 0 0 auto !important; + flex-flow: row nowrap !important; + align-items: center !important; + justify-content: flex-end !important; + align-self: center !important; + justify-self: end !important; + gap: 8px !important; + width: max-content !important; + min-width: max-content !important; + max-width: none !important; + height: 36px !important; + min-height: 36px !important; + margin: 0 !important; + padding: 0 !important; + overflow: visible !important; + white-space: nowrap !important; + } + + .security-settings-card .security-key-header > .security-recovery-actions > .el-button { + display: inline-flex !important; + flex: 0 0 auto !important; + align-items: center !important; + justify-content: center !important; + width: max-content !important; + min-width: max-content !important; + height: 36px !important; + min-height: 36px !important; + max-height: 36px !important; + box-sizing: border-box !important; + margin: 0 !important; + padding: 0 14px !important; + line-height: 1 !important; + white-space: nowrap !important; + word-break: keep-all !important; + overflow-wrap: normal !important; + writing-mode: horizontal-tb !important; + } + + .security-settings-card .security-key-header > .security-recovery-actions > .el-button > span { + display: inline-flex !important; + align-items: center !important; + justify-content: center !important; + height: 100% !important; + max-width: none !important; + overflow: visible !important; + white-space: nowrap !important; + line-height: 1 !important; + } +} + +/* 移动端保留可横向滚动的按钮行,避免文字变形。 */ +@media (max-width: 767px) { + .security-settings-card .security-key-header { + display: flex !important; + flex-direction: column !important; + align-items: stretch !important; + gap: 12px !important; + } + + .security-settings-card .security-key-header > :first-child { + display: block !important; + min-width: 0 !important; + } + + .security-settings-card .security-key-header > :first-child > h3 { + margin: 0 0 8px !important; + white-space: nowrap !important; + } + + .security-settings-card .security-key-header > .security-recovery-actions { + display: flex !important; + flex-flow: row nowrap !important; + align-items: center !important; + align-self: stretch !important; + justify-content: flex-start !important; + width: 100% !important; + min-width: 0 !important; + max-width: 100% !important; + height: 36px !important; + min-height: 36px !important; + overflow-x: auto !important; + overflow-y: hidden !important; + padding: 0 !important; + } +}