Skip to content

Commit

Permalink
fix(form): StepForm support moblie width
Browse files Browse the repository at this point in the history
close #7412
  • Loading branch information
chenshuai2144 committed Jul 23, 2023
1 parent 98ca5b5 commit 6eee22f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/form/src/BaseForm/BaseForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,10 @@ function BaseForm<T = Record<string, any>, U = Record<string, any>>(
[`> div:not(${token.proComponentsCls}-form-light-filter)`]: {
'.pro-field': {
maxWidth: '100%',
'@media screen and (max-width: 575px)': {
// 减少了 form 的 padding
maxWidth: 'calc(100vw - 48px)',
},
// 适用于短数字,短文本或者选项
'&-xs': {
width: 104,
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/layouts/StepsForm/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const genStepsFormStyle: GenerateStyle<StepsFormToken> = (token) => {
[token.componentCls]: {
'&-container': {
width: 'max-content',
minWidth: '520px',
minWidth: '420px',
maxWidth: '100%',
margin: 'auto',
},
Expand Down

0 comments on commit 6eee22f

Please sign in to comment.