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

Form.Item组件 labelCol和wrapperCol配置在移动端无效,label和输入框会各占一行 #21858

Closed
1 task done
wangzongming opened this issue Mar 4, 2020 · 8 comments

Comments

@wangzongming
Copy link

wangzongming commented Mar 4, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://ant.design/components/form-cn/#API

Steps to reproduce

            <Form name="dynamic_rule">
                <Form.Item
                    {...{
                        labelCol: { span: 4 },
                        wrapperCol: { span: 20 },
                    }}
                    name="nickname"
                    label="Nickname" 
                >
                    <Input placeholder="Please input your nickname" />
                </Form.Item>

            </Form>

What is expected?

在小屏幕下这个布局配置也能用

What is actually happening?

.

Environment Info
antd 4.0.0
React 16.8
System window10
Browser Chrome 75.0.3770.80(正式版本) (64 位)
@afc163
Copy link
Member

afc163 commented Mar 4, 2020

#10591

@zombieJ
Copy link
Member

zombieJ commented Mar 5, 2020

It's by design. #20836

cc @shaodahong

@shaodahong
Copy link
Member

Yep, we made label and input item width 100% when screen width less than 575px

@wangzongming
Copy link
Author

Oh, how sad I am!The Form my component USES is encapsulated, and sometimes a line needs to display two input fields or something like that.The rc version is fine, the official version is broken, you are making the components too inflexible.But I've changed my style.

@shaodahong
Copy link
Member

I'm sorry about this. If we change display style, It's a breaking change, we need to be consistent with v3

@wangzongming
Copy link
Author

no. i like v4

@FelicityGao
Copy link

你这样让我怎么在一行即显示标签又显示输入框?

@whx76
Copy link

whx76 commented Apr 12, 2022

最好有设置可自己决定是否在575以下这样处理,有时是需要同行显示

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

6 participants