Skip to content

Commit

Permalink
fix(antd/next): disable label/wrapper col when vertical layout
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Mar 2, 2022
1 parent 9f907c1 commit 119fd38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/antd/src/form-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const BaseItem: React.FC<IFormItemProps> = ({ children, ...props }) => {
// 栅格模式
}
if (labelCol || wrapperCol) {
if (!labelStyle.width && !wrapperStyle.width) {
if (!labelStyle.width && !wrapperStyle.width && layout !== 'vertical') {
enableCol = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/form-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const BaseItem: React.FC<IFormItemProps> = (props) => {
// 栅格模式
}
if (labelCol || wrapperCol) {
if (!labelStyle.width && !wrapperStyle.width) {
if (!labelStyle.width && !wrapperStyle.width && layout !== 'vertical') {
enableCol = true
}
}
Expand Down

0 comments on commit 119fd38

Please sign in to comment.