Skip to content

Commit

Permalink
fix(layout): fix col size error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Jul 31, 2023
1 parent 470ab14 commit 749a303
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/layout/src/ProLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -562,16 +562,16 @@ const BaseProLayout: React.FC<ProLayoutProps> = (props) => {
() => ({
lg: true,
md: true,
sm: false,
sm: true,
xl: false,
xs: false,
xs: true,
xxl: false,
}),
[],
);
const col = Grid.useBreakpoint() || defaultCol;

const isMobile = (col.sm === true || col.xs === true) && !props.disableMobile;
const isMobile = (col.sm || col.xs) && !col.md && !props.disableMobile;

const colSize = useMemo(() => {
return Object.keys(col).filter((key) => col[key] === true)[0] || 'md';
Expand Down

0 comments on commit 749a303

Please sign in to comment.