Skip to content

Commit

Permalink
fix(layout): 默认宽度更改为 1152
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Sep 14, 2023
1 parent d3daf14 commit 8fd2665
Show file tree
Hide file tree
Showing 8 changed files with 443 additions and 235 deletions.
4 changes: 2 additions & 2 deletions packages/layout/src/components/GridContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const GridContent: React.FC<GridContentProps> = (props) => {
const value = useContext(RouteContext);
const {
children,
contentWidth: propsContentWidth,
contentWidth: propsContentWidth = 'Fluid',
className: propsClassName,
style,
} = props;
Expand All @@ -35,7 +35,7 @@ const GridContent: React.FC<GridContentProps> = (props) => {
const contentWidth = propsContentWidth || value.contentWidth;
const className = `${prefixCls}-grid-content`;
const { wrapSSR, hashId } = useStyle(className);
const isWide = contentWidth === 'Fixed';
const isWide = contentWidth !== 'Fixed';

This comment has been minimized.

Copy link
@sendya

sendya Sep 16, 2023

这里逻辑是不是反了,现在配置 ProLayout 的 contentWidth = Fluid 的情况下,变成了定宽 1152


return wrapSSR(
<div
Expand Down
66 changes: 66 additions & 0 deletions tests/card/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7572,6 +7572,72 @@ exports[`card demos > 📸 renders ./packages/card/src/demos/basic.tsx correctly
</div>
</div>
</div>
<div
class="ant-pro-card ant-pro-card-box-shadow"
style="max-width: 300px;"
>
<div
class="ant-pro-card-header"
>
<div
class="ant-pro-card-title"
>
<div
class="ant-pro-core-label-tip"
>
<div
class="ant-pro-core-label-tip-title"
>
带卡片阴影
</div>
<span
class="ant-pro-core-label-tip-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</div>
</div>
<div
class="ant-pro-card-extra"
>
extra
</div>
</div>
<div
class="ant-pro-card-body"
>
<div>
Card content
</div>
<div>
Card content
</div>
<div>
Card content
</div>
</div>
</div>
<div
class="ant-pro-card ant-pro-card-size-small"
style="max-width: 300px; margin-block-start: 24px;"
Expand Down
2 changes: 1 addition & 1 deletion tests/field/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/base.tsx correctl
style="margin-right: 8px;"
>
<span>
* * * * *
************************
</span>
</div>
<div
Expand Down
4 changes: 2 additions & 2 deletions tests/field/__snapshots__/field.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3579,7 +3579,7 @@ exports[`Field > 🐴 read and plain 1`] = `
style="margin-right: 8px;"
>
<span>
* * * * *
************************
</span>
</div>
<div
Expand Down Expand Up @@ -4129,7 +4129,7 @@ exports[`Field > 🐴 read ant no plain 1`] = `
style="margin-right: 8px;"
>
<span>
* * * * *
************************
</span>
</div>
<div
Expand Down
2 changes: 1 addition & 1 deletion tests/field/field.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ describe('Field', () => {
const html = render(
<Field text={123456} valueType="password" mode="read" />,
);
await html.findByText('* * * * *');
await html.findByText('************************');

act(() => {
fireEvent.click(
Expand Down
5 changes: 3 additions & 2 deletions tests/form/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -47992,13 +47992,14 @@ exports[`form demos > 📸 renders ./packages/form/src/demos/layout-footer.tsx c
</div>
</div>
<div
class="ant-pro-grid-content"
class="ant-pro-grid-content ant-pro-grid-content-wide"
>
<div
class="ant-pro-grid-content-children"
>
<div
class="ant-pro-page-container-children-container"
style="padding-block-start: 32px;"
>
<div
class="ant-card ant-card-bordered"
Expand Down Expand Up @@ -49457,7 +49458,7 @@ exports[`form demos > 📸 renders ./packages/form/src/demos/layout-footer.tsx c
</main>
<div
class="ant-pro-layout-has-footer"
style="height: 64px; margin-block-start: 24px;"
style="height: 64px; margin-block-start: 32px;"
/>
</div>
</div>
Expand Down
Loading

0 comments on commit 8fd2665

Please sign in to comment.