From c2bdd6e0703591f9c7e49fb0e19aba91b3e168e6 Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Sun, 1 Nov 2026 16:54:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E7=94=A8=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=EF=BC=9BTable=20=E6=94=AF=E6=8C=81=E6=95=B4?= =?UTF-8?q?=E8=A1=8C=E9=80=89=E4=B8=AD=E3=80=81StatGrid=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89=E9=99=8D=E5=88=97=E8=8A=82?= =?UTF-8?q?=E5=A5=8F=E3=80=81Select=20=E6=94=AF=E6=8C=81=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/forms/Select.tsx | 6 +- frontend/src/components/ui/Controls.tsx | 6 +- frontend/src/components/ui/Overlay.tsx | 8 +- frontend/src/components/ui/Page.tsx | 5 + frontend/src/components/ui/Panel.tsx | 31 ++- frontend/src/components/ui/Rows.tsx | 2 +- frontend/src/components/ui/Table.tsx | 13 +- frontend/src/pages/UserAdmin.tsx | 316 ++++++++++++++++++++++- 8 files changed, 366 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/forms/Select.tsx b/frontend/src/components/forms/Select.tsx index 490c2e6..17c878c 100644 --- a/frontend/src/components/forms/Select.tsx +++ b/frontend/src/components/forms/Select.tsx @@ -28,11 +28,13 @@ export type SelectProps = { className?: string id?: string name?: string + /** 禁用时要解释原因(「不能修改自己的角色」),否则灰掉的下拉只会让人反复点 */ + title?: string } export function Select({ value, onChange, options, disabled, placeholder = '请选择', searchThreshold = 8, - size = 'md', ariaLabel, className, id, name + size = 'md', ariaLabel, className, id, name, title }: SelectProps) { const opts = useMemo(() => toOptions(options), [options]) const uid = useId() @@ -141,7 +143,7 @@ export function Select({ return ( -
+
{children}
{actions && ( -