diff --git a/docs/UI规范.md b/docs/UI规范.md index 2156ce0..ca19e21 100644 --- a/docs/UI规范.md +++ b/docs/UI规范.md @@ -44,7 +44,7 @@ | R15 | **按钮一律是图标按钮**:凡有动作语义的按钮都写 `icon={}`,`FilePick` / `RecordAudio` 这两个自带触发元素的封装也走 `icon` 槽;一个意思全站只许一只图形(§5.1.1) | 一排纯文字按钮要逐个读完才知道哪颗是什么,图标剪影一眼分得开;用户截图原话「按钮都要使用图标按钮」 | | R16 | **信息块三件套各有唯一写法**(§13.1):① **统计**=`Stat`/`StatGrid`,自带 `bg-fill-tertiary` 底纹 + 右下角语义水印图形,页面不再手涂 `bg-[#...]`;② **只读回显**=`Info`(antd `Descriptions`),「灰盒 + label 在上」和用 `Input disabled` 装只读值一律废止,只读 `Tag` 不许描边,统计用途的计数不许用无底纹灰胶囊;③ **语义提示**=`Notice`(antd `Alert`),页面不再自拼 `border + warning-bg` 当告警 | 白底数字块与卡片同色,扫不出「这是结论」还是「这是容器」;灰盒回显和旁边的输入框长得一样,用户去找可点的框,框里却没有可改的东西;底纹与告警底色都是 antd 自己的 fill / 语义色层,明暗两档跟主题走,不需要再养一套私有皮肤 | | R17 | **表格行不许被子元素撑高**(§13.2):① 先做列宽预算——`Table` 默认 `minWidth={false}`,定宽列合计必须回到容器里,长文列**不写 `width`** 吃掉剩余宽度且扣掉内边距后 ≥ 200px;② 单元格里的长文案一律 `` 封顶(标题 1 行 / 说明与报错 2 行)并把全文挂原生 `title`,表格里的 `ErrorText` 同样必须给 `lines`;③ 动作列按「`颗数×32 + (颗数−1)×6 + 16`」算宽、图标化一行放完。一个格子的预算是**正文两行 + 次要元信息一行 ≈ 84px**,超了就是返工。**这条由 `scripts/ui/tableaudit.py` 常驻量,不靠自觉** | 「列宽」与「文案长度」两头堵,只调列宽永远调不完:审核留痕一句质检长文把行顶到 255px、生成记录一条 prompt 顶到 227px,一屏只剩三条记录,表格退化成段落。用户第 28 轮原话「表格行不要被子元素撑高(长文折 8 行 = 设计失败)」 | -| R18 | **每一级的身份与动作只在该级说一遍**(§6.5 四级层次):项目名 / 状态 / 进度 / 归档 / 删除只属于**项目层**(顶栏那颗流程控制台胶囊是唯一入口,点开右侧「项目概况」抽屉);「这是哪一站 + 这一站的主操作」只属于**环节层**(`NodeHead`:一张带底纹描边的独立面板);数据与筛选只属于**内容层**(`Panel`)。工作台外壳 `pages/ProjectDetail.tsx` 除兜底(载入 / 未找到 / 报错)外**不渲染任何可见块** | 用户第 11 轮原话「要进一步把各级的信息归拢并提供交互的层次清晰」:当时同一条项目身份在顶栏、外壳面包屑、概览页页头各说一遍,而**项目级**的「归档」坐在**环节级**页头上 | +| R18 | **每一级的身份与动作只在该级说一遍**(§6.5 四级层次):项目名 / 状态 / 进度 / 归档 / 删除只属于**项目层**(顶栏那颗流程控制台胶囊是唯一入口,点开右侧「项目概况」抽屉);「这是哪一站 + 这一站的主操作」只属于**环节层**(`PageHead`:一张带底纹描边的独立门牌卡);数据与筛选只属于**内容层**(`Panel`)。工作台外壳 `pages/ProjectDetail.tsx` 除兜底(载入 / 未找到 / 报错)外**不渲染任何可见块** | 用户第 11 轮原话「要进一步把各级的信息归拢并提供交互的层次清晰」:当时同一条项目身份在顶栏、外壳面包屑、概览页页头各说一遍,而**项目级**的「归档」坐在**环节级**页头上 | --- ## 1. 谁定尺子:四层,antd 在最上面 @@ -509,18 +509,24 @@ items = [ |---|---|---|---| | ① 项目入口 | `app/layout/PipelineConsole.tsx`(顶栏那颗 `Button.nex-console`) | 项目名 + 状态 + 轨道 + 百分比 + 当前节点,点击 = 展开/收起概况抽屉 | 不再跳「流程概览」;不写按钮以外的动作 | | ② 项目层 | `app/layout/ProjectBriefDrawer.tsx`(右侧 `Drawer`,宽 `min(620px, calc(100vw - 32px))`) | 项目身份 `Info` + 4 张 `Stat` + 流程进度 + **七站跳转** + 归档 / 取消归档 / 删除(footer 唯一一颗 primary) | 不发第二个请求:全部读 `stores/project.ts` 那份轮询数据 | -| ③ 环节层 | `NodeHead`(`components/ui/Page.tsx` = 一张 `.nex-panel.nex-nodehead`) | 这一站的标题 + 一句话职责 + 这一站的主操作;眉标由路由算出「项目环节 · 第 N / 7 站 · 名称」 | 不写项目名 / 项目状态 / 项目级动作 | +| ③ 环节层 | `PageHead`(`components/ui/Page.tsx` = 一张 `.nex-panel.nex-pagehead`) | 菜单同款图标 + 一级标题 + 一句话职责 + 这一站的主操作(图标由 `navItemAt(pathname)` 反查侧栏菜单,菜单与门牌读同一个 ReactNode,物理上不可能不一致) | 不写项目名 / 项目状态 / 项目级动作;不写眉标「第 N / 7 站」——站次由侧栏、顶栏控制台、概况抽屉三处说(R18) | | ④ 内容层 | `Panel` / `PanelHead` / `Ctlbar` / `Table` | 这批数据本身 | 不重复上面三层 | - **外壳 `pages/ProjectDetail.tsx` 只剩数据装载**:按路由 `loadProject` + `startPolling`、 三种兜底(`Loading` / `Empty` / `ErrorText`)、``。它**不渲染任何可见块**—— 「展开概况」这颗按钮连同那条面包屑工具条一起删了,因为入口已经还给顶栏。 别把项目名、状态 Tag、指标卡加回来(那正是 R18 要清的东西)。 -- **`NodeHead` 是 `PageHead` 的一层皮肤**:属性完全同 `PageHead`(`title` / `sub` / `meta` / - `actions`),项目七站一律用它,全局页(项目总览 / 平台资产库 / 模型管理中心)继续用 `PageHead`。 - 皮肤只有 `app.css` 一处:主色 7%(深色 14%)斜向渐变 + `colorPrimaryBorder` 描边 + 体 12/24 内边距, - 眉标那颗 20px 色块是 `.nex-nodehead-mark`。站次从 `app/layout/nav.tsx` 的 `projectModules` - 反查路由算出,页面不参与,所以七站的眉标算法只有一份。 +- **内容页页头只剩 `PageHead` 一个实现**(2026-11 第十二轮把 `NodeHead` 并了进来): + 项目七站与全局页(项目总览 / 平台资产库 / 模型管理中心 / 用户管理 / 账号 / 手册)写的是同一个组件, + 所以「门牌该多高、图标多大、主操作落在哪个坐标」全站只有一份代码。它只有两行: + 第一行 = 标题行(`.nex-pagehead-title` 定高 `controlHeight`=32:32×32 色块图标 + `Title level={3}`) + 左侧、主操作 `ActionGroup auto={false}` 右侧,二者同排两端对齐; + 第二行 = `w-full` 的 `meta` + `sub`(这一站特有的计数 / 口径 + 一句职责说明)。 + 旧眉标「项目环节 · 第 N / 7 站 · 名称」整条删除——它和侧栏当前项、顶栏控制台、概况抽屉是同一句话,R18。 + 图标默认由 `app/layout/nav.tsx::navItemAt(pathname)` 反查菜单项得到(不在菜单里的页显式传 `icon`, + 传 `icon={null}` 明确不放);色块几何与统计卡同族:`.nex-stat-mark` / `.nex-pagehead-mark` / + `.nex-brief-mark`(32 / 32 / 20 三档共用一套配色与圆角)。 + 1440 实测:13 个内容页的门牌标题行高恒为 32、图标 32×32、主操作右缘一律 1391、中线一律 109.0。 - **抽屉里的跳转 = 七站列表**,不是流程条:顶栏那条 12 段轨道已经改成容器自适应网格、 整段不可点(§7.2),抽屉里的「项目环节」七行(`.nex-brief-row`)才是导航入口, 每行右端那个 `Tag` 是这一站的汇总状态(由它覆盖的那几个节点折算,`lib/pipeline.ts::moduleState`)。 @@ -562,7 +568,7 @@ event-filter / ai-bar / agent-options` 在 React 里都塌缩成同一个 `` 拼这种行,也不许在里面的按钮上补 `size="sm"`:两套实现并存时,实测素材墙一张卡底同时长出 24 和 32 两种按钮(`AI 生成` 24、`上传` 32)。 - 反过来,**页面层的 `` / `PageHead`·`NodeHead` 的 `actions` / `PanelHead right` 是 md 档**,里面一律不写 `size`—— + 反过来,**页面层的 `` / `PageHead` 的 `actions` / `PanelHead right` 是 md 档**,里面一律不写 `size`—— 档位由「这行坐在哪个容器里」决定;在 md 行里写死 `size="sm"` 就是同排两档的唯一成因(qa 探针的 B 类)。 - `Field`:标签列是 `minmax(var(--label-w), max-content)`——**只给下限不给上限**, 超长中文标题宁可把控件顶右,也不截断标签。 diff --git a/frontend/src/app/layout/ProjectBriefDrawer.tsx b/frontend/src/app/layout/ProjectBriefDrawer.tsx index 7c7e3af..5b1537b 100644 --- a/frontend/src/app/layout/ProjectBriefDrawer.tsx +++ b/frontend/src/app/layout/ProjectBriefDrawer.tsx @@ -12,7 +12,7 @@ * 做法:四级层次各归各位—— * ① 顶栏控制台 = 唯一的项目身份入口(点击展开本抽屉,不再跳页); * ② 本抽屉 = 项目层(身份回显 / 指标 / 流程 / 七站跳转 / 归档 / 删除); - * ③ NodeHead = 环节层页头(每站一张带底纹的卡,见 components/ui/Page.tsx); + * ③ PageHead = 内容层门牌卡(每站一张带底纹的卡,见 components/ui/Page.tsx); * ④ Panel = 内容层。于是工作台外壳可以一行可见块都不渲染(见 pages/ProjectDetail.tsx)。 * 为什么用右侧抽屉而不是弹窗:这是「随时查一眼项目全局」的辅助面板, * 遮罩之下正文还在原地,关掉就回到刚才那一站,不需要重新载入。 @@ -170,7 +170,7 @@ export function ProjectBriefDrawer({ open, onClose, projectId }: { } diff --git a/frontend/src/pages/project/Library.tsx b/frontend/src/pages/project/Library.tsx index 28a33f7..c88493f 100644 --- a/frontend/src/pages/project/Library.tsx +++ b/frontend/src/pages/project/Library.tsx @@ -21,7 +21,7 @@ import { Select } from '../../components/forms' import { AudioPlay } from '../../components/media/AudioPlay' import { MediaThumb } from '../../components/media/MediaThumb' import { RecordAudio, type RecordPickMeta } from '../../components/media/RecordAudio' -import { ActionGroup, Actions, BarRight, Block, Button, CARD_ROW, CardActions, Check, Chip, ChipBar, Ctlbar, Divider, Drawer, Empty, ErrorText, ExtLink, Field, FieldBlock, FilePick, FormGrid, FormRow, IconText, Info, Input, LINK_CLS, LineHint, LinkButton, MONO, MUTED, MUTED_MONO, Notice, NumberInput, NodeHead, PageStack, Panel, PanelHead, Row, SearchInput, SectionTitle, Spinner, Table, Tabs, Tag, TagGroup, TextArea, Toolbar, Value, cellWrap } from '../../components/ui' +import { ActionGroup, Actions, BarRight, Block, Button, CARD_ROW, CardActions, Check, Chip, ChipBar, Ctlbar, Divider, Drawer, Empty, ErrorText, ExtLink, Field, FieldBlock, FilePick, FormGrid, FormRow, IconText, Info, Input, LINK_CLS, LineHint, LinkButton, MONO, MUTED, MUTED_MONO, Notice, NumberInput, PageHead, PageStack, Panel, PanelHead, Row, SearchInput, SectionTitle, Spinner, Table, Tabs, Tag, TagGroup, TextArea, Toolbar, Value, cellWrap } from '../../components/ui' import { useSystemStore } from '../../stores/system' import { refresh, useProjectStore } from '../../stores/project' import { notify } from '../../stores/notice' @@ -729,9 +729,9 @@ export default function Library() { return ( {/* 页头(第 1 条):环节名 + 职责说明 + 这一页的主操作。 - 主操作是「新建当前面板的资产」——它整页成立,所以进 NodeHead; + 主操作是「新建当前面板的资产」——它整页成立,所以进 PageHead; 两个跨页跳转是另一层意思,自成一组并排放左边。 */} - diff --git a/frontend/src/pages/project/Overview.tsx b/frontend/src/pages/project/Overview.tsx index f6deeae..47ecb37 100644 --- a/frontend/src/pages/project/Overview.tsx +++ b/frontend/src/pages/project/Overview.tsx @@ -25,7 +25,7 @@ import { refresh, useProjectStore } from '../../stores/project' import { notify } from '../../stores/notice' import { useAutoRefresh } from '../../hooks' import { Select } from '../../components/forms' -import { NodeHead, Actions, Button, CardRow, Chip, Info, Ctlbar, Divider, ErrorText, Field, FieldBlock, FormGrid, FormRow, Grid, IconText, Input, LINK_CLS, Layout, LinkButton, LogBox, LogRow, MONO, Notice, MUTED, MUTED_MONO, NumberInput, PageStack, Panel, PanelHead, Row, SearchInput, Stack, Stat, Table, Tag, TagGroup, TextArea, Value, Clamp } from '../../components/ui' +import { PageHead, Actions, Button, CardRow, Chip, Info, Ctlbar, Divider, ErrorText, Field, FieldBlock, FormGrid, FormRow, Grid, IconText, Input, LINK_CLS, Layout, LinkButton, LogBox, LogRow, MONO, Notice, MUTED, MUTED_MONO, NumberInput, PageStack, Panel, PanelHead, Row, SearchInput, Stack, Stat, Table, Tag, TagGroup, TextArea, Value, Clamp } from '../../components/ui' import AgentConsole from './AgentConsole' import { IconBolt, IconCheck, IconChevronRight, IconChevronUp, IconClose, IconFolder, IconGrid, IconImage, IconPass, IconTracks, IconUser, IconVoice } from '../../components/icons' /** @@ -242,7 +242,7 @@ export default function Overview() { 却坐在**环节级**页头上,和外壳的面包屑、顶栏控制台各说一遍项目信息。 归档/删除现在统一收进顶栏控制台展开的「项目概况」抽屉,这一页只回答 「流程走到哪、下一节点缺什么、在总控台下指令」,所以页头没有动作。 */} - diff --git a/frontend/src/pages/project/Review.tsx b/frontend/src/pages/project/Review.tsx index 3b5b305..3022f29 100644 --- a/frontend/src/pages/project/Review.tsx +++ b/frontend/src/pages/project/Review.tsx @@ -13,7 +13,7 @@ import { useAutoRefresh } from '../../hooks' import { Select } from '../../components/forms' import { AudioPlay } from '../../components/media/AudioPlay' import { MediaThumb } from '../../components/media/MediaThumb' -import { NodeHead, ActionGroup, Actions, Button, Check, ChipBar, Ctlbar, Divider, Empty, ErrorText, Field, FormRow, Row, BarRight, SegmentedTabs, Count, IconText, Info, Input, Layout, LineHint, MONO, MUTED, MUTED_MONO, NumberInput, PageStack, Panel, PanelHead, SectionTitle, Spinner, Status, Table, Tag, TagGroup, TextArea, Toolbar, Value, Clamp } from '../../components/ui' +import { PageHead, ActionGroup, Actions, Button, Check, ChipBar, Ctlbar, Divider, Empty, ErrorText, Field, FormRow, Row, BarRight, SegmentedTabs, Count, IconText, Info, Input, Layout, LineHint, MONO, MUTED, MUTED_MONO, NumberInput, PageStack, Panel, PanelHead, SectionTitle, Spinner, Status, Table, Tag, TagGroup, TextArea, Toolbar, Value, Clamp } from '../../components/ui' import { refresh, useProjectStore } from '../../stores/project' import { notify } from '../../stores/notice' import { IconAim, IconDownload, IconEye, IconPass, IconReject, IconReload, IconRetry } from '../../components/icons' @@ -203,10 +203,10 @@ export default function Review() { return ( - {/* 页头(第 1 条):三个批量动作是这一页的主操作,整页成立 → 进 NodeHead。 + {/* 页头(第 1 条):三个批量动作是这一页的主操作,整页成立 → 进 PageHead。 症状(第 6 条):它们以前和六个只读计数挤在同一张卡头里, 左端是一排会折行的表格、右端是三颗长文案按钮,窄屏先把按钮压成两行。 */} - diff --git a/frontend/src/pages/project/Storyboard.tsx b/frontend/src/pages/project/Storyboard.tsx index 44b4328..411f560 100644 --- a/frontend/src/pages/project/Storyboard.tsx +++ b/frontend/src/pages/project/Storyboard.tsx @@ -28,7 +28,7 @@ import { refresh, useProjectStore } from '../../stores/project' import { options, useSystemStore } from '../../stores/system' import { notify } from '../../stores/notice' import { openPreview, usePreviewOpen } from '../../stores/preview' -import { NodeHead, ActionGroup, Actions, BarRight, Between, BLOCK_TONE, Button, CARD_ROW, Check, Checkbox, Chip, ChipBar, CloseButton, Ctlbar, DRAWER_ACTIONS, DRAWER_BODY, DRAWER_HEAD, DRAWER_TITLE, Divider, Empty, ErrorText, ExportMenu, ExtLink, Field, FieldBlock, FilePick, FormGrid, FormRow, IconText, Input, LINK_CLS, LinkButton, Loading, MUTED, MUTED_MONO, MaybeNumberInput, Mono, Notice, NumberInput, PageStack, Panel, PanelHead, Row, Scrim, SearchInput, SectionTitle, Spinner, Status, TAG_DENSE, Table, Tabs, Tag, TagGroup, TextArea, Toolbar, Value, ViewSwitch, cellWrap, type Columns } from '../../components/ui' +import { PageHead, ActionGroup, Actions, BarRight, Between, BLOCK_TONE, Button, CARD_ROW, Check, Checkbox, Chip, ChipBar, CloseButton, Ctlbar, DRAWER_ACTIONS, DRAWER_BODY, DRAWER_HEAD, DRAWER_TITLE, Divider, Empty, ErrorText, ExportMenu, ExtLink, Field, FieldBlock, FilePick, FormGrid, FormRow, IconText, Input, LINK_CLS, LinkButton, Loading, MUTED, MUTED_MONO, MaybeNumberInput, Mono, Notice, NumberInput, PageStack, Panel, PanelHead, Row, Scrim, SearchInput, SectionTitle, Spinner, Status, TAG_DENSE, Table, Tabs, Tag, TagGroup, TextArea, Toolbar, Value, ViewSwitch, cellWrap, type Columns } from '../../components/ui' import { floatingLayerOpen } from '../../lib/layers' import { IconAdd, IconArrowDown, IconArrowUp, IconAudit, IconCheck, IconChevronUp, IconClose, IconCompose, IconCopy, IconDelete, IconDownload, IconDragHandle, IconEdit, IconEye, IconGrid, IconImage, IconListOrdered, IconMic, IconParams, IconPlayCircle, IconReload, IconRetry, IconSearch, IconSound, IconToTop, IconUpload, IconVideo, IconWarn } from '../../components/icons' @@ -1085,8 +1085,8 @@ export default function Storyboard() { 分隔线全都自己定,于是它是全站唯一「像卡皮、但不是卡」的横条。 现在它就是 (只有卡头的 Card),指标改成一行摘要文字。 */} {/* 页头(第 1 条):「导入」和「新建」是同一件事的两种入口(都是往工作台里加镜头), - 永远并排,整页成立 → 进 NodeHead,不再混在吸顶工具条的视图切换旁边。 */} - @@ -1515,7 +1515,7 @@ export default function Storyboard() { title="听得见的东西,用名词短语(键盘敲击声、空调底噪),不要写成句子。模型直出声音时它除了给这一镜铺底噪,还能占住台词前后的空闲时间:MiniMax H3 的音轨和画面一样长,空着的地方它不会留静音,而是从提示词里挑一段画面描述念出来(成片开头那句听不懂的话就是这么来的)。没人说话的镜头同样该填。"> edit({ ambience: e.target.value })} /> - edit({ subtitle_enabled: next })}>启用字幕
diff --git a/frontend/src/pages/project/Timeline.tsx b/frontend/src/pages/project/Timeline.tsx index 793d605..b9851ca 100644 --- a/frontend/src/pages/project/Timeline.tsx +++ b/frontend/src/pages/project/Timeline.tsx @@ -16,7 +16,7 @@ import { refresh, useProjectStore } from '../../stores/project' import { useSystemStore } from '../../stores/system' import { notify } from '../../stores/notice' import { openPreview } from '../../stores/preview' -import { NodeHead, ActionGroup, Actions, Button, Check, Chip, ChipBar, Ctlbar, Divider, Empty, ErrorText, ExtLink, Field, FieldBlock, FilePick, FormGrid, FormRow, Grid, Count, IconText, Input, IssueRow, Layout, LineHint, MONO, MUTED, MUTED_MONO, MaybeNumberInput, Mono, NumberInput, OptionGrid, PageStack, Panel, PanelHead, Row, Spinner, Status, Table, Tag, TagGroup, TextArea, Toolbar, Value } from '../../components/ui' +import { PageHead, ActionGroup, Actions, Button, Check, Chip, ChipBar, Ctlbar, Divider, Empty, ErrorText, ExtLink, Field, FieldBlock, FilePick, FormGrid, FormRow, Grid, Count, IconText, Input, IssueRow, Layout, LineHint, MONO, MUTED, MUTED_MONO, MaybeNumberInput, Mono, NumberInput, OptionGrid, PageStack, Panel, PanelHead, Row, Spinner, Status, Table, Tag, TagGroup, TextArea, Toolbar, Value } from '../../components/ui' import { IconAdd, IconArrowDown, IconArrowUp, IconCheck, IconChevronDown, IconChevronUp, IconClose, IconDelete, IconEdit, IconEye, IconMic, IconPass, IconSound, IconStar, IconTracks, IconWarn } from '../../components/icons' /** @@ -412,8 +412,8 @@ export default function Timeline() { (名字 、TagGroup、SectionTitle 当标签用、两颗按钮,四种高度挤一排)。 现在它是「只有卡头的卡」:名字进卡头标题、计数进 sub、版本操作进 extra。 */} {/* 页头(第 1 条):时间线版本是这一页的全局对象——下拉选中哪一版, - 「设为当前 / 删除」就作用于哪一版,三件必须同排,所以整组提进 NodeHead。 */} - diff --git a/frontend/src/styles/app.css b/frontend/src/styles/app.css index 323464f..8aad316 100644 --- a/frontend/src/styles/app.css +++ b/frontend/src/styles/app.css @@ -149,38 +149,38 @@ textarea) { width: 100%; min-width: 0 } .nex-panel .ant-card-body { min-width: 0 } .nex-panel .ant-card-body > * { min-width: 0 } -/* ── 环节页头(NodeHead):项目七站的页头是一张**有底纹描边的卡** ────────── - 症状(2026-11 第十一轮 · 用户第 1 条原话「项目中切到每个节点应该是其对应的 - Header,这部分应该放入一个有样式的单独面板中」):页头是一行裸浮在页面 - 底色上的字,和正文第一张卡之间只有 16px 空白,读起来像「正文上面漏了半句 - 话」;上面还叠着外壳那条同样裸着的面包屑条,两层无边界的东西贴在一起, - 分不清哪句说项目、哪句说这一站。 +/* ── 内容页页头(PageHead):每一页的门牌是一张**有底纹描边的卡** ────────── + 症状(2026-11 第十一轮 · 用户原话「项目中切到每个节点应该是其对应的 Header, + 这部分应该放入一个有样式的单独面板中」;第十二轮 · 用户原话「内容页 Header + 重写」):页头是一行裸浮在页面底色上的字,和正文第一张卡之间只有 16px 空白, + 读起来像「正文上面漏了半句话」;上面还叠着外壳那条同样裸着的面包屑条, + 两层无边界的东西贴在一起,分不清哪句说项目、哪句说这一站。 做法:页头坐进自己的 Card,底纹 = 主色 7%(深色 14%)斜向渐变收进卡底色, 描边取主色描边那一族——它是全站唯一带主色描边的卡,一眼就是「这一层的门牌」, 下面的正文卡都是中性描边,主次不再靠字号硬撑。 + 第十二轮起这条对**所有内容页**成立(七站 + 项目总览 / 平台资产库 / 模型控制台 + / 用户管理 / 账号 / 手册):组件也只剩 PageHead 一个,旧的 NodeHead 并了进来, + 「环节页头」和「全局页页头」再也不是两套皮肤。 特异度:antd 5.29 把样式注进 与 app.css 抢先后,两个类起步, body 内边距那条堆到三个类才压得住 `.ant-card-small > .ant-card-body`。 */ -.nex-panel.nex-nodehead { +.nex-panel.nex-pagehead { border-color: var(--ant-color-primary-border); background: linear-gradient(115deg, color-mix(in srgb, var(--ant-color-primary) 7%, var(--ant-color-bg-container)) 0%, var(--ant-color-bg-container) 58%); } -html[data-theme='dark'] .nex-panel.nex-nodehead { +html[data-theme='dark'] .nex-panel.nex-pagehead { background: linear-gradient(115deg, color-mix(in srgb, var(--ant-color-primary) 14%, var(--ant-color-bg-container)) 0%, var(--ant-color-bg-container) 58%); } -.nex-panel.nex-nodehead > .ant-card-body { padding: var(--ant-padding-sm) var(--ant-padding-lg) } -/* 眉标左侧那枚环节图标:与统计卡那只 32px 色块同族,只是页头这行字矮,降到 20px */ -.nex-nodehead-mark { - display: inline-flex; align-items: center; justify-content: center; - inline-size: 20px; block-size: 20px; flex: none; - border-radius: var(--ant-border-radius-sm); - background: color-mix(in srgb, var(--ant-color-primary) 14%, transparent); - color: var(--ant-color-primary); - font-size: var(--ant-font-size-sm); -} +.nex-panel.nex-pagehead > .ant-card-body { padding: var(--ant-padding-sm) var(--ant-padding-lg) } +/* 门牌第一行(菜单同款图标 + 一级标题)定高 = 控件档。 + 症状(2026-11 第十二轮 · 用户原话「右侧的主功能入口要对齐」):主操作原先挂在 + **整块页头**的垂直中线上,七站的职责说明有的两行有的一行,那颗主按钮在每一页的 y + 都不一样;概览页没有动作时中线还空着。第一行既然定高,同排右对齐的动作组就必然 + 七站同高、右缘贴卡内边距——「对齐」由几何保证,不靠页面自己垫 margin。 */ +.nex-pagehead-title { min-block-size: var(--ant-control-height) } /* ── 顶栏流程控制台(PipelineConsole):一颗**打开项目概况抽屉**的按钮 ────── 症状(用户第 2 条):项目身份在站内说了三遍——顶栏这颗胶囊、外壳那条面包屑、 @@ -436,20 +436,35 @@ html[data-theme='dark'] .nex-tag.ant-tag { background: color-mix(in srgb, var(-- 为什么用 color-mix 而不是新色值:站内 `#hex` 只许出现在 theme/antd.ts(§2), 这里按语义色变量比例混合,明暗两档自动跟着主题走,不产生第二套色板。 */ .nex-stat { --nex-stat-tint: var(--ant-color-primary) } -.nex-stat-mark { +/* 色块族(统计卡 / 内容页门牌 / 概况抽屉的七站行):一套几何两档大小。 + 门牌那枚(.nex-pagehead-mark)取的是 `app/layout/nav.tsx` 里菜单项的图形本身, + 和侧栏同一份 ReactNode——菜单换图当天页头跟着换,不存在「两边长得不一样」。 + `--nex-stat-tint` 缺省时落回主色:页头与抽屉行没有 tone,统计卡才有。 */ +.nex-stat-mark, .nex-pagehead-mark, .nex-brief-mark { display: flex; align-items: center; justify-content: center; + flex: none; + background: color-mix(in srgb, var(--nex-stat-tint, var(--ant-color-primary)) 12%, transparent); + color: var(--nex-stat-tint, var(--ant-color-primary)); +} +.nex-stat-mark, .nex-pagehead-mark { inline-size: 32px; block-size: 32px; - flex: none; border-radius: var(--ant-border-radius-lg); - background: color-mix(in srgb, var(--nex-stat-tint) 12%, transparent); - color: var(--nex-stat-tint); font-size: 17px; } -html[data-theme='dark'] .nex-stat-mark { - background: color-mix(in srgb, var(--nex-stat-tint) 18%, transparent); +/* 概况抽屉里的七站行整行只有 34px,色块降到控件小档,不然行高被它顶开 */ +.nex-brief-mark { + inline-size: 20px; + block-size: 20px; + border-radius: var(--ant-border-radius-sm); + font-size: var(--ant-font-size-sm); +} +html[data-theme='dark'] .nex-stat-mark, +html[data-theme='dark'] .nex-pagehead-mark, +html[data-theme='dark'] .nex-brief-mark { + background: color-mix(in srgb, var(--nex-stat-tint, var(--ant-color-primary)) 18%, transparent); } /* ── 只读回显(Info = antd Descriptions):R16.3 ──────────────────────────────