From 139db20320bf57ec2427528df04a7067b455158b Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Mon, 2 Nov 2026 14:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20FormGrid=20=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=BA=A7=2012=20=E5=88=97=E5=9F=BA=E5=87=86=E6=A0=85?= =?UTF-8?q?=E6=A0=BC=EF=BC=9A=E5=88=97=E8=BE=B9=E7=95=8C=E4=BB=8E=E6=AF=8F?= =?UTF-8?q?=E6=9D=A1=20FormRow=20=E4=B8=8A=E6=94=B6=E5=88=B0=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E4=BD=9C=E7=94=A8=E5=9F=9F=E7=BB=9F=E4=B8=80=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E4=B8=80=E6=AC=A1=EF=BC=8CFormRow=20=E7=9A=84=20cols?= =?UTF-8?q?=20=E9=80=80=E5=8C=96=E4=B8=BA=E3=80=8C=E8=BF=99=E8=A1=8C?= =?UTF-8?q?=E5=87=A0=E4=B8=AA=E5=AD=97=E6=AE=B5=E3=80=8D=3D=20=E6=AF=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=B7=A8=2012/cols=20=E6=A0=BC=EF=BC=8C?= =?UTF-8?q?=E6=A8=AA=E5=90=91=E9=97=B4=E8=B7=9D=E4=B9=9F=E5=BD=92=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=EF=BC=88=E5=9F=BA=E5=87=86=E6=A0=85=E6=A0=BC?= =?UTF-8?q?=E9=87=8C=E6=8D=A2=E5=88=97=E9=97=B4=E8=B7=9D=E4=BC=9A=E8=AE=A9?= =?UTF-8?q?=E6=95=B4=E6=9D=A1=E5=88=97=E7=BA=BF=E6=BC=82=201.7px=EF=BC=89?= =?UTF-8?q?=EF=BC=8C=E4=B8=80=E8=A1=8C=E4=B8=80=E9=A1=B9=E4=B8=8E=20width?= =?UTF-8?q?=3Dfull=20=E7=94=A8=20:only-child/data-full=20=E9=93=BA?= =?UTF-8?q?=E6=BB=A1=EF=BC=9B=E6=A8=A1=E5=9E=8B=E6=8A=BD=E5=B1=89=E3=80=81?= =?UTF-8?q?=E5=88=86=E9=95=9C=E6=A3=80=E8=A7=86=E5=99=A8=E3=80=81=E7=B4=A0?= =?UTF-8?q?=E6=9D=90=E6=8A=BD=E5=B1=89=E7=AD=89=207=20=E4=B8=AA=E5=A4=9A?= =?UTF-8?q?=E8=A1=8C=E8=A1=A8=E5=8D=95=E5=AE=B9=E5=99=A8=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=EF=BC=8C=E5=AD=97=E6=AE=B5=E6=A0=87=E9=A2=98=E9=94=99=E4=BD=8D?= =?UTF-8?q?=E4=BB=8E=20110px=20=E9=99=8D=E5=88=B0=200=EF=BC=9BSlider=20?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=B9=B6=E5=85=A5=20LABEL=5FCLS=20=E4=B8=8E?= =?UTF-8?q?=20Field=20=E5=90=8C=E5=B0=BA=EF=BC=9B=E5=AD=A4=E7=AB=8B=20Form?= =?UTF-8?q?Row=20=E4=BF=9D=E7=95=99=E5=8E=9F=20auto-fit=20=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E9=9B=B6=E6=94=B9=E5=8A=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ui/Controls.tsx | 90 ++- frontend/src/components/ui/Slider.tsx | 3 +- frontend/src/pages/AssetLibrary.tsx | 540 ++++++++-------- frontend/src/pages/Dashboard.tsx | 140 ++-- frontend/src/pages/ModelCenter.tsx | 412 ++++++------ frontend/src/pages/project/Library.tsx | 392 ++++++------ frontend/src/pages/project/Overview.tsx | 224 +++---- frontend/src/pages/project/Storyboard.tsx | 738 +++++++++++----------- frontend/src/pages/project/Timeline.tsx | 134 ++-- 9 files changed, 1384 insertions(+), 1289 deletions(-) diff --git a/frontend/src/components/ui/Controls.tsx b/frontend/src/components/ui/Controls.tsx index 5f77c07..10ea0a8 100644 --- a/frontend/src/components/ui/Controls.tsx +++ b/frontend/src/components/ui/Controls.tsx @@ -1,3 +1,4 @@ +import { createContext, useContext } from 'react' import type { ReactNode } from 'react' import { cn } from '../../lib/cn' import { TAG_DENSE } from './Status' @@ -12,12 +13,15 @@ import { TAG_DENSE } from './Status' * 行内标签字段(标签在左、控件在右;grow / wide / narrow 调宽) * 需要右靠的一组控件(替代写在控件上的 margin-left:auto) * chip 行(与下方内容强制呼吸 12px) - * 短字段栅格(auto-fit 自己降列,页面不写 @media) + * 表单级栅格作用域:一个表单只在这里定义一次列边界(12 等分) + * 表单里的一行(有 FormGrid 时按跨格数落位,没有时 auto-fit 自己降列) * 分页条(page_size 唯一的家) * 高度一律不写在控件上:容器把 --ctl-h 压到紧凑档,行内控件跟着一起降。 */ -const LABEL = 'flex flex-row items-center gap-1.5 m-0 text-muted text-tiny tracking-[.3px] whitespace-nowrap' +/** 行内字段标签的唯一尺子:Field 与 Slider 共用,抽屉里两种字段的标题必须量出同一个字号 */ +export const LABEL_CLS = 'flex flex-row items-center gap-1.5 m-0 text-muted text-tiny tracking-[.3px] whitespace-nowrap' +const LABEL = LABEL_CLS /** 字段行内标签(标签在左):文字本身不拉伸,否则被挤成两行 */ const LABEL_CHILD = '[&>label]:flex [&>label]:flex-row [&>label]:items-center [&>label]:gap-1.5 [&>label]:m-0 ' + '[&>label]:text-muted [&>label]:text-tiny [&>label]:tracking-[.3px] [&>label]:whitespace-nowrap' @@ -71,7 +75,8 @@ export function Field({ label, required, children, width = 'default', className, title?: string }) { return ( -