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

[Feature Request] Form 表单的 label 和 控件支持上下布局 #902

Open
felix9ia opened this issue Feb 28, 2025 · 3 comments
Open

Comments

@felix9ia
Copy link

felix9ia commented Feb 28, 2025

使用示例,包括组件或 Hooks

有些场景下,label 的文字可能很长,如果是国际化,英文就可能更长

解决方案

在 Form.Item 以及 Field 空间上增加一个类似 flex-direction: row; 这样的属性,比如 item-direction,可选 row 和 column。

可以参考 https://ui.shadcn.com/ 的 form 表单的布局

Image

你想为这个功能创建一个 PR 吗

None

@felix9ia
Copy link
Author

或者,干脆把 label 提取成一个控件,让用户自由组合,就像 ios 一样,有 UILabel 这个控件。
https://developer.apple.com/documentation/UIKit/UILabel

@felix9ia
Copy link
Author

felix9ia commented Feb 28, 2025

或者,干脆把 label 提取成一个控件,让用户自由组合,就像 ios 一样,有 UILabel 这个控件。 https://developer.apple.com/documentation/UIKit/UILabel

哦, Flex 控件如果能指定 flex-direction: row 属性,搭配着 Flex 控件就更好了

@felix9ia felix9ia changed the title [Feature Request] Form 表单的 label 和 控件支持换行布局 [Feature Request] Form 表单的 label 和 控件支持上下布局 Mar 1, 2025
@felix9ia
Copy link
Author

felix9ia commented Mar 1, 2025

感觉属性叫 labelPosition 更合适些?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant