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.

Auto-layout 推断多列时 modal 尺寸未自适应,2列表单容器过窄 #618

Closed

Description

@hotlong

问题描述

���前 ModalForm 支持 auto-layout,表单字段数量多时会推断 columns=2。但即使 auto-layout 推断出多列,弹窗 modalSize 仍默认为 default (max-w-lg, 512px)。实际效果是:

  • 表单被渲染为两列,但弹窗宽度过窄,导致单列纵向堆叠,或者两列略显拥挤,与预期的分栏布局体验不符。
  • 用户期望有 2/3 列布局时自动切换到更宽的弹窗(如 lg/xl),让两列布局真正可用。
Create Contact 弹窗截图

复现步骤

  1. 使用 ObjectForm/ObjectGrid 打开 Contact create 弹窗(字段大于 4)
  2. 保持 modalSize 不填或用 default
  3. 表单被推断为 2 列,实际 UI 仍然单列或空间极窄

分析排查

建议修复方案

  • 当 auto-layout 推断 columns > 1 且用户未手动配置 modalSize 时,自动升级弹窗 modalSize 至 lg 或 xl,美观且空间合适。
  • 或者在 columns 推断为 2/3/4 时,分别用 lg/xl/full 标准宽度。
  • 文档和交互提示也可以同步更新。

受影响版本

  • 当前 main

关联

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions