From e70c5080440c03bc90813a625fed526e186453f9 Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Mon, 2 Nov 2026 15:20:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=8E=89=E4=B8=8B=E6=8B=89=E6=B5=AE?= =?UTF-8?q?=E5=B1=82=E8=A2=AB=E8=87=AA=E5=B7=B1=20layer=20=E4=B8=8A?= =?UTF-8?q?=E7=9A=84=20fixed=20=E5=BA=9F=E6=8E=89=E9=81=BF=E8=AE=A9?= =?UTF-8?q?=EF=BC=9ARadix=20=E7=9A=84=20translate=20=E5=9C=A8=E5=AE=83?= =?UTF-8?q?=E5=A4=96=E5=B1=82=20wrapper=20=E4=B8=8A=EF=BC=8C=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=86=8D=E5=86=99=20position:fixed=20=E5=B0=B1?= =?UTF-8?q?=E8=84=B1=E7=A6=BB=E6=96=87=E6=A1=A3=E6=B5=81=E3=80=81wrapper?= =?UTF-8?q?=20=E9=87=8F=E5=88=B0=E7=9A=84=E9=AB=98=E5=BA=A6=E6=98=AF=200?= =?UTF-8?q?=EF=BC=8Cflip/size=20=E5=85=A8=E6=8C=89=200=20=E9=AB=98?= =?UTF-8?q?=E7=AE=97=E2=80=94=E2=80=941280x720=20=E8=B4=B4=E8=BF=91?= =?UTF-8?q?=E8=A7=86=E5=8F=A3=E5=BA=95=E8=BE=B9=E7=9A=84=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E8=A6=81=E4=B9=88=E8=AF=A5=E7=BF=BB=E4=B8=8D=E7=BF=BB=E8=A2=AB?= =?UTF-8?q?=E5=8E=8B=E6=88=90=2035px=EF=BC=8C=E8=A6=81=E4=B9=88=E7=BF=BB?= =?UTF-8?q?=E4=BA=86=E4=B8=8D=E5=87=8F=E9=AB=98=E5=BA=A6=E6=8E=89=E5=87=BA?= =?UTF-8?q?=E5=B1=8F=E5=B9=95=20125px=EF=BC=8C=E5=8F=B3=E4=BE=A7=E8=BF=98?= =?UTF-8?q?=E4=BC=9A=E6=BA=A2=E5=87=BA=E8=A7=86=E5=8F=A3=2045px=EF=BC=9B?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=20fixed=20=E5=90=8E=2019=20=E4=B8=AA?= =?UTF-8?q?=E4=B8=8B=E5=8D=8A=E5=B1=8F=E4=B8=8B=E6=8B=89=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E5=AE=8C=E6=95=B4=E8=90=BD=E5=9C=A8=E8=A7=86=E5=8F=A3=E5=86=85?= =?UTF-8?q?=E3=80=81=E4=B8=89=E4=B8=AA=E5=AE=BD=E5=BA=A6=E4=B8=8B=E6=97=A0?= =?UTF-8?q?=E6=A8=AA=E5=90=91=E8=A3=81=E5=88=87=E3=80=82=E9=A1=BA=E6=89=8B?= =?UTF-8?q?=E6=8A=8A=20/account=20=E4=B8=A4=E5=88=97=E4=B8=8E=E4=B8=89?= =?UTF-8?q?=E5=88=97=E4=B8=A4=E5=BC=A0=E5=8D=A1=E4=B9=9F=E6=8E=A5=E8=BF=9B?= =?UTF-8?q?=20FormGrid=20=E5=9F=BA=E5=87=86=E6=A0=85=E6=A0=BC=EF=BC=8C?= =?UTF-8?q?=E5=A4=9A=E6=A0=85=E6=A0=BC=E5=AE=B9=E5=99=A8=E9=94=99=E4=BD=8D?= =?UTF-8?q?=E5=BD=92=E9=9B=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/primitives/layers.ts | 5 +- frontend/src/pages/Account.tsx | 96 ++++++++++---------- 2 files changed, 53 insertions(+), 48 deletions(-) diff --git a/frontend/src/components/primitives/layers.ts b/frontend/src/components/primitives/layers.ts index 0924251..414ea84 100644 --- a/frontend/src/components/primitives/layers.ts +++ b/frontend/src/components/primitives/layers.ts @@ -37,7 +37,10 @@ export const triggerLayer = cva([ * 直接消费它们,就不需要旧 use-popup.ts 里手算 left/top/maxH 与二次纠正。 */ export const contentLayer = [ - 'fixed z-[400] flex flex-col overflow-hidden', + // 不能写 fixed:Radix 的定位在它外层 wrapper 上(translate 摆位置), + // 面板自己再 fixed 就脱离文档流,wrapper 量到的高度是 0, + // flip/size 全按 0 高算——贴近视口底边时「该翻不翻」或「翻了不减高度」,面板掉到屏幕外。 + 'z-[400] flex flex-col overflow-hidden', 'rounded-[10px] border border-line-strong bg-panel shadow-pop', // 宽度三段式:至少和触发器一样宽(面板不会缩成一条)、按最长选项自然展开 // (长标签不该被挤成两行)、超过 440 或视口放不下才换行 diff --git a/frontend/src/pages/Account.tsx b/frontend/src/pages/Account.tsx index d7ed514..7c57745 100644 --- a/frontend/src/pages/Account.tsx +++ b/frontend/src/pages/Account.tsx @@ -12,7 +12,7 @@ import { describeUserAgent, fmtAgo, fmtTime } from '../lib/format' import { useAutoRefresh } from '../hooks/use-auto-refresh' import { SecretInput } from '../components/forms' import { - Actions, Button, CardRow, Empty, ErrorText, Field, FormRow, Layout, Notice, PageHead, Panel, PanelHead, Stack, Tag + Actions, Button, CardRow, Empty, ErrorText, Field, FormGrid, FormRow, Layout, Notice, PageHead, Panel, PanelHead, Stack, Tag } from '../components/ui' import { login, roleLabel, setUser, useAuthStore } from '../stores/auth' @@ -107,53 +107,55 @@ export default function Account() { - - - - - - setProfile((p) => ({ ...p, display_name: e.target.value }))} /> - - - setProfile((p) => ({ ...p, email: e.target.value }))} /> - - - - - - - + + + + + + + setProfile((p) => ({ ...p, display_name: e.target.value }))} /> + + + setProfile((p) => ({ ...p, email: e.target.value }))} /> + + + + + + + - - - - - setPwd((p) => ({ ...p, current_password: v }))} /> - - - setPwd((p) => ({ ...p, new_password: v }))} /> - - - setPwd((p) => ({ ...p, confirm: v }))} - onKeyUp={(e) => { if (e.key === 'Enter') void changePassword() }} /> - - - - - - - + + + + + setPwd((p) => ({ ...p, current_password: v }))} /> + + + setPwd((p) => ({ ...p, new_password: v }))} /> + + + setPwd((p) => ({ ...p, confirm: v }))} + onKeyUp={(e) => { if (e.key === 'Enter') void changePassword() }} /> + + + + + + + +