Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

右侧详情 Drawer 支持 auto-layout 多列并开放左右/弹窗/页面等导航模式配置 #623

Closed

Description

@hotlong

问题描述

目前 Console(以及部分插件应用)展示行详情时,均是右侧弹出的单列表单/详情面板。实现方式一般是:

  • 行点击后用 recordId 写入 URL 查询参数
  • 自行渲染 <Sheet side="right"><DetailView columns=1 ... /></Sheet>,如 apps/console/src/components/ObjectView.tsx 第 400–431 行

存在两个核心问题:

  1. 单列布局体验差: 字段多时详情面板页面过长、可用空间浪费严重(实际 drawer 宽度约 600px~700px,完全可以支持 2-3 列布局)
  2. 平台导航模式能力未利用: navigation 配置支持 drawer/modal/page/split... 等多种类型,但 Console/业务代码绕过平台配置,直接写死右侧 Drawer
右侧弹出详情单列截图

优化建议

  • 改造所有右侧栏详情面板,统一使用平台的 NavigationOverlay/DetailView,columns 留空或交由 auto-layout 推断,支持 2/3 列合理排布(参考 ModalForm 自动分栏)
  • 支持通过 ViewNavigationConfig 完全配置详情打开模式(drawer/modal/page/split/popover/新标签/不响应),不应在应用层写死
    • 例: navigation: { mode: 'drawer', width: '700px' } 或 { mode: 'modal', width: 800 }
  • 业务/Console/App 层不得再自行包 Drawer+DetailView,全部走平台能力
  • 默认详情列数同 auto-layout 推断(如字段≤3单列,4-10两列,更多可 3 列等),允许业务 schema 覆盖。

受益

相关

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions