Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

metadata.json Schema

根 metadata.json

路径类型必填说明
workspacesarray所有可用 Workspace 工作空间
workspaces[].idstring逻辑 ID,不依赖目录名
workspaces[].namestringWorkspace 显示名,出现在 WorkspaceSwitcher
workspaces[].iconstring图标名
workspaces[].dirstringfixture 子目录名,解耦 ID 和路径
sectionsarray导航段定义
sections[].idstring段标识符,Workspace 按 id 引用
sections[].dividerBeforeboolean该段前是否渲染分隔线
{
  "workspaces": [
    { "id": "internal", "name": "量潮创始人", "icon": "person_outline", "dir": "founder" },
    { "id": "customer", "name": "量潮科技", "icon": "business_outlined", "dir": "company" }
  ],
  "sections": [
    { "id": "dashboard",  "dividerBefore": false },
    { "id": "business",  "dividerBefore": true },
    { "id": "function",  "dividerBefore": true }
  ]
}

dashboard 段无上分隔线,businessfunction 段前有分隔线。

每 Workspace metadata.json

assets/fixtures/{dir}/metadata.json

路径类型必填说明
sectionsarray该 Workspace 引用的导航段
sections[].idstring引用根的段 id
sections[].itemsstring[]导航项 name 列表,通过 RouteConfig.find(name) 解析路由

items 为纯字符串,对应 RouteConfig 中定义的 id。label、icon、screenType 均在 Dart 代码的 RouteConfig 中集中管理。

founder 引用 dashboard + business 两个段:

{
  "sections": [
    { "id": "dashboard", "items": ["dashboard"] },
    { "id": "business", "items": ["thinking", "writing"] }
  ]
}

→ 侧边栏: 仪表盘 | 分隔线 | 思考 · 写作

company 引用全部三个段:

{
  "sections": [
    { "id": "dashboard", "items": ["dashboard"] },
    { "id": "business", "items": ["data", "classroom", "consulting", "cloud"] },
    { "id": "function", "items": ["hr", "finance", "org", "strategy", "media"] }
  ]
}

→ 侧边栏: 仪表盘 | 分隔线 | 数据·课堂·咨询·云 | 分隔线 | 人力·财务·组织·战略·新媒体

RouteConfig 路由表

路由定义集中在 lib/route_config.dartRouteConfig.all 列表中。

idlabeliconscreenType依赖数据
dashboard仪表盘today_outlineddashboarddashboard.json
thinking思考psychology_outlinedthinkingthinking.json
writing写作edit_outlinedwriting无(占位)
consulting量潮咨询support_agent_outlinedconsultingqtconsult.json
classroom量潮课堂school_outlinedclassroomqtclass.json
org组织管理account_tree_outlinedorgorg.json
data量潮数据storage_outlinedbusiness_detaildashboard.json → businessUnits
cloud量潮云cloud_outlinedbusiness_detaildashboard.json → businessUnits
hr人力资源people_outlinefunction_detaildashboard.json → functionCards
finance财务管理account_balance_outlinedfunction_detaildashboard.json → functionCards
strategy战略管理track_changes_outlinedfunction_detaildashboard.json → functionCards
media新媒体campaign_outlinedfunction_detaildashboard.json → functionCards

可用图标

person_outline business_outlined today_outlined storage_outlined school_outlined support_agent_outlined cloud_outlined psychology_outlined edit_outlined people_outline account_balance_outlined account_tree_outlined track_changes_outlined campaign_outlined

未识别的降级为 Icons.circle_outlined