Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Form): 修复 FormItem 的 colSize 属性逻辑 #11541

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BeMxself
Copy link
Contributor

What

  • 在设置 flex 属性时,增加了对 colSize 为 undefined 或 null 的处理
  • 避免在这些情况下将 flex 设置为 '1',以保留更多的样式灵活性

Why

考虑这类布局:
image

如果不考虑 colSize 未设置(或清空设置)的情况,表单将会丧失上图这种布局方式的灵活性。
增加这个逻辑可兼顾多种需求。

@github-actions github-actions bot added the fix label Jan 23, 2025
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

- 在设置 flex 属性时,增加了对 colSize 为 undefined 或 null 的处理
- 避免在这些情况下将 flex 设置为 '1',以保留更多的样式灵活性
@BeMxself BeMxself force-pushed the fix-form-children-row-layout-col-style branch from 903248d to a6fef98 Compare January 24, 2025 03:21
- 删除了 combo、inputArray 和 inputTable 渲染器中不必要的 flex 样式
- 默认的class已经具备了 flex:1 的样式效果,在非必须的情况下增加 style 标签会破坏样式的灵活性
@BeMxself BeMxself force-pushed the fix-form-children-row-layout-col-style branch from b213e37 to f8c2f59 Compare January 24, 2025 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant