fix: basic form style abnormal (#21907)

* fix: basic form style abnormal

* improve grid

* upgrade snapshots and improve priority

* resolve #22009

* fix wrap element

* increase priority

* revert grid basic demo

* fix snapshots
This commit is contained in:
骗你是小猫咪 2020-03-10 22:15:27 +08:00 committed by GitHub
parent 924f1cfd3a
commit 9ccd5bcc33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 6 deletions

View File

@ -1 +1,10 @@
@import './index';
.@{form-prefix-cls}-horizontal {
.@{form-item-prefix-cls}-label {
flex-grow: 0;
}
.@{form-item-prefix-cls}-control {
flex: 1 1 0;
}
}

View File

@ -74,6 +74,7 @@
// ==============================================================
&-label {
display: inline-block;
flex-grow: 0;
overflow: hidden;
white-space: nowrap;
text-align: right;
@ -136,6 +137,7 @@
&-control {
display: flex;
flex-direction: column;
flex-grow: 1;
&:first-child:not([class^=~"'@{ant-prefix}-col-'"]):not([class*=~"' @{ant-prefix}-col-'"]) {
width: 100%;

View File

@ -24,11 +24,14 @@
.@{form-prefix-cls}-item .@{form-prefix-cls}-item-label {
.make-vertical-layout-label();
}
.@{form-prefix-cls}-item {
.@{form-prefix-cls}-item-label,
.@{form-prefix-cls}-item-control {
flex: 0 0 100%;
max-width: 100%;
.@{form-prefix-cls} {
.@{form-prefix-cls}-item {
flex-wrap: wrap;
.@{form-prefix-cls}-item-label,
.@{form-prefix-cls}-item-control {
flex: 0 0 100%;
max-width: 100%;
}
}
}
}

View File

@ -59,7 +59,7 @@
.@{ant-prefix}-col {
position: relative;
flex: 0 1 auto;
flex: 1 0 auto;
max-width: 100%;
// Prevent columns from collapsing when empty
min-height: 1px;