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 uses layout to set labelCol and wrapperCol at the same time for inline to show no effect #3862

Closed
1 task
IanLew opened this issue Mar 26, 2021 · 1 comment

Comments

@IanLew
Copy link

IanLew commented Mar 26, 2021

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

Version

2.1.0

Environment

window10, Google Chrome 89.0.4389.82, vue 3.0.7

Reproduction link

Edit on CodeSandbox

Steps to reproduce

<a-form
layout="inline"
:model="form"
:label-col="{ span: 8 }"
:wrapper-col="{ span: 16 }"

What is expected?

按照labelCol和wrapperCol设置重新分配占比

What is actually happening?

并没有跟随Form.Item的宽度变化产生变化


从style上看:.ant-form-item的display:inline-block覆盖了.ant-row的display:flex,而内部的.ant-col-*是使用的flex进行伸缩flex: 0 0 *%,从而导致inline达不到效果

@github-actions github-actions bot changed the title Form使用layout为inline同时设置labelCol和wrapperCol展示无效果 Form uses layout to set labelCol and wrapperCol at the same time for inline to show no effect Mar 26, 2021
@zkwolf zkwolf added bug 2.x for 2.x labels Mar 28, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants